Class SendRequest
java.lang.Object
io.awspring.cloud.kinesis.operations.SendRequest
A record to send to Kinesis. The content is either a plain payload or a Spring
Message, optionally combined
with custom headers.
When a message is set, its headers are passed to the converter. A
payload set as well replaces the payload of the message and keeps its headers. Custom
headers override message headers of the same name. Custom headers are only
visible on the wire when the converter embeds headers (see EmbeddedHeadersKinesisMessageConverter).
Instances are immutable: the custom headers are copied at build time.
- Since:
- 4.3.0
- Author:
- Matej Nedic
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SendRequest.Builderbuilder()Create a newSendRequest.Builder.@Nullable StringThe hash key that overrides the partition key hash when Kinesis picks the shard.headers()The custom headers, not including the headers ofmessage().@Nullable Message<?>message()The message to send, if the request was built from one.The partition key Kinesis hashes to pick the shard, unless anexplicit hash keyis set.payload()The payload to serialize: the payload set on the builder, otherwise the payload ofmessage().@Nullable StringThe sequence number of a previous record from the same partition key, used to keep strict ordering for single-record sends.The name of the stream the record is sent to.
-
Method Details
-
builder
Create a newSendRequest.Builder.- Returns:
- a new builder.
-
streamName
The name of the stream the record is sent to.- Returns:
- the stream name.
-
partitionKey
The partition key Kinesis hashes to pick the shard, unless anexplicit hash keyis set.- Returns:
- the partition key.
-
payload
The payload to serialize: the payload set on the builder, otherwise the payload ofmessage().- Returns:
- the payload.
-
message
The message to send, if the request was built from one.- Returns:
- the message, or
nullfor a payload request.
-
headers
The custom headers, not including the headers ofmessage().- Returns:
- an immutable map of custom headers.
-
explicitHashKey
The hash key that overrides the partition key hash when Kinesis picks the shard.- Returns:
- the explicit hash key, or
nullto use the partition key hash.
-
sequenceNumberForOrdering
The sequence number of a previous record from the same partition key, used to keep strict ordering for single-record sends. Ignored by batch sends, becausePutRecordsdoes not support it.- Returns:
- the sequence number for ordering, or
nullif not set.
-