public abstract static class SqsIO.WriteBatches<T> extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.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(). |
| Constructor and Description |
|---|
WriteBatches() |
| Modifier and Type | Method and Description |
|---|---|
SqsIO.WriteBatches.Result |
expand(org.apache.beam.sdk.values.PCollection<T> input) |
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(org.joda.time.Duration timeout)
The duration to accumulate records before timing out, default is 3 secs.
|
SqsIO.WriteBatches<T> |
withBatchTimeout(org.joda.time.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, validatepublic 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(org.joda.time.Duration timeout)
By default timeouts will be checked upon arrival of records.
public SqsIO.WriteBatches<T> withBatchTimeout(org.joda.time.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(org.apache.beam.sdk.values.PCollection<T> input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,SqsIO.WriteBatches.Result>