Experimental
@aws-cdk/aws-pipes-sources-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
SqsSourceParameters Struct
Parameters for the SQS source.
| Stability | Experimental |
|---|---|
| Source | lib/sqs.ts |
Example
ts
declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;
const pipeSource = new sources.SqsSource(sourceQueue, {
batchSize: 10,
maximumBatchingWindow: cdk.Duration.seconds(10)
});
const pipe = new pipes.Pipe(this, 'Pipe', {
source: pipeSource,
target: new SqsTarget(targetQueue)
});
python
# source_queue: sqs.Queue
# target_queue: sqs.Queue
pipe_source = sources.SqsSource(source_queue,
batch_size=10,
maximum_batching_window=cdk.Duration.seconds(10)
)
pipe = pipes.Pipe(self, "Pipe",
source=pipe_source,
target=SqsTarget(target_queue)
)
csharp
// Install: dotnet add package Amazon.CDK.AWS.Pipes.Sources.Alpha
Queue sourceQueue;
Queue targetQueue;
var pipeSource = new SqsSource(sourceQueue, new SqsSourceParameters {
BatchSize = 10,
MaximumBatchingWindow = Duration.Seconds(10)
});
var pipe = new Pipe(this, "Pipe", new PipeProps {
Source = pipeSource,
Target = new SqsTarget(targetQueue)
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkpipessourcesalpha/v2
var sourceQueue Queue
var targetQueue Queue
pipeSource := sources.NewSqsSource(sourceQueue, &SqsSourceParameters{
BatchSize: jsii.Number(10),
MaximumBatchingWindow: cdk.Duration_Seconds(jsii.Number(10)),
})
pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
Source: pipeSource,
Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
})
Properties
batchSizeoptionalnumberbatch_sizeoptionalint | floatbatchSizeoptionalNumberBatchSizeoptionaldoubleBatchSizeoptional*float64 = 10 #The maximum number of records to include in each batch.