public abstract static class SqsIO.WriteBatches<T> extends PTransform<PCollection<T>,SqsIO.WriteBatches.Result>
PTransform
to send messages to SQS. See SqsIO
for more information on usage
and configuration.Modifier and Type | Class and Description |
---|---|
static interface |
SqsIO.WriteBatches.DynamicDestination<T> |
static interface |
SqsIO.WriteBatches.EntryMapperFn<T>
Mapper to create a
SendMessageBatchRequestEntry from a unique batch entry id and the
input T . |
static class |
SqsIO.WriteBatches.Result
Result of
SqsIO.writeBatches() . |
annotations, displayData, name, resourceHints
Constructor and Description |
---|
WriteBatches() |
Modifier and Type | Method and Description |
---|---|
SqsIO.WriteBatches.Result |
expand(PCollection<T> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
SqsIO.WriteBatches<T> |
to(SqsIO.WriteBatches.DynamicDestination<T> destination)
Dynamic record based destination to write to.
|
SqsIO.WriteBatches<T> |
to(java.lang.String queueUrl)
Queue url to write to.
|
SqsIO.WriteBatches<T> |
withBatchSize(int batchSize)
The batch size to use, default (and AWS limit) is
10 . |
SqsIO.WriteBatches<T> |
withBatchTimeout(Duration timeout)
The duration to accumulate records before timing out, default is 3 secs.
|
SqsIO.WriteBatches<T> |
withBatchTimeout(Duration timeout,
boolean strict)
The duration to accumulate records before timing out, default is 3 secs.
|
SqsIO.WriteBatches<T> |
withClientConfiguration(ClientConfiguration config)
Configuration of SQS client.
|
SqsIO.WriteBatches<T> |
withConcurrentRequests(int concurrentRequests)
Max number of concurrent batch write requests per bundle, default is
5 . |
SqsIO.WriteBatches<T> |
withEntryMapper(SqsIO.WriteBatches.EntryMapperFn.Builder<T> mapper)
Optional mapper to create a batch entry from the input
T using a builder, otherwise
inferred from the schema. |
SqsIO.WriteBatches<T> |
withEntryMapper(SqsIO.WriteBatches.EntryMapperFn<T> mapper)
Optional mapper to create a batch entry from a unique entry id and the input
T ,
otherwise inferred from the schema. |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
public SqsIO.WriteBatches<T> withClientConfiguration(ClientConfiguration config)
public SqsIO.WriteBatches<T> withConcurrentRequests(int concurrentRequests)
5
.public SqsIO.WriteBatches<T> withEntryMapper(SqsIO.WriteBatches.EntryMapperFn<T> mapper)
T
,
otherwise inferred from the schema.public SqsIO.WriteBatches<T> withEntryMapper(SqsIO.WriteBatches.EntryMapperFn.Builder<T> mapper)
T
using a builder, otherwise
inferred from the schema.public SqsIO.WriteBatches<T> withBatchSize(int batchSize)
10
.public SqsIO.WriteBatches<T> withBatchTimeout(Duration timeout)
By default timeouts will be checked upon arrival of records.
public SqsIO.WriteBatches<T> withBatchTimeout(Duration timeout, boolean strict)
By default timeouts will be checked upon arrival of records. If using strict
enforcement, timeouts will be check by a separate thread.
public SqsIO.WriteBatches<T> to(SqsIO.WriteBatches.DynamicDestination<T> destination)
public SqsIO.WriteBatches<T> to(java.lang.String queueUrl)
public SqsIO.WriteBatches.Result expand(PCollection<T> input)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
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).
expand
in class PTransform<PCollection<T>,SqsIO.WriteBatches.Result>