Package org.apache.beam.sdk.io.aws2.sqs
Class SqsIO.WriteBatches<T>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<T>,SqsIO.WriteBatches.Result>
org.apache.beam.sdk.io.aws2.sqs.SqsIO.WriteBatches<T>
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
SqsIO
public abstract static class SqsIO.WriteBatches<T>
extends PTransform<PCollection<T>,SqsIO.WriteBatches.Result>
A
PTransform to send messages to SQS. See SqsIO for more information on usage
and configuration.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfaceMapper to create aSendMessageBatchRequestEntryfrom a unique batch entry id and the inputT.static classResult ofSqsIO.writeBatches(). -
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand(PCollection<T> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.Queue url to write to.to(SqsIO.WriteBatches.DynamicDestination<T> destination) Dynamic record based destination to write to.withBatchSize(int batchSize) The batch size to use, default (and AWS limit) is10.withBatchTimeout(Duration timeout) The duration to accumulate records before timing out, default is 3 secs.withBatchTimeout(Duration timeout, boolean strict) The duration to accumulate records before timing out, default is 3 secs.Configuration of SQS client.withConcurrentRequests(int concurrentRequests) Max number of concurrent batch write requests per bundle, default is5.Optional mapper to create a batch entry from the inputTusing a builder, otherwise inferred from the schema.Optional mapper to create a batch entry from a unique entry id and the inputT, otherwise inferred from the schema.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
WriteBatches
public WriteBatches()
-
-
Method Details
-
withClientConfiguration
Configuration of SQS client. -
withConcurrentRequests
Max number of concurrent batch write requests per bundle, default is5. -
withEntryMapper
Optional mapper to create a batch entry from a unique entry id and the inputT, otherwise inferred from the schema. -
withEntryMapper
Optional mapper to create a batch entry from the inputTusing a builder, otherwise inferred from the schema. -
withBatchSize
The batch size to use, default (and AWS limit) is10. -
withBatchTimeout
The duration to accumulate records before timing out, default is 3 secs.By default timeouts will be checked upon arrival of records.
-
withBatchTimeout
The duration to accumulate records before timing out, default is 3 secs.By default timeouts will be checked upon arrival of records. If using
strictenforcement, timeouts will be check by a separate thread. -
to
Dynamic record based destination to write to. -
to
Queue url to write to. -
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expandin classPTransform<PCollection<T>,SqsIO.WriteBatches.Result>
-