public class SendMessageBatchRequest extends AmazonWebServiceRequest implements java.io.Serializable
Delivers up to ten messages to the specified queue. This is a batch version
of SendMessage
. For a FIFO queue, multiple messages
within a single batch are enqueued in the order they are sent.
The result of sending each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.
The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KB (262,144 bytes).
The following list shows the characters (in Unicode) that are allowed in your message, according to the W3C XML specification:
#x9
| #xA
| #xD
| [#x20
to #xD7FF
] | [#xE000
to #xFFFD
] | [
#x10000
to #x10FFFF
]
For more information, see RFC1321. If you send any characters that aren't included in this list, your request will be rejected.
If you don't specify the DelaySeconds
parameter for an entry,
Amazon SQS uses the default for the queue.
Some API actions take lists of parameters. These lists are specified using
the param.n
notation. Values of n
are integers
starting from 1. For example, a parameter list with two elements looks like
this:
&Attribute.1=this
&Attribute.2=that
Constructor and Description |
---|
SendMessageBatchRequest()
Default constructor for SendMessageBatchRequest object.
|
SendMessageBatchRequest(java.lang.String queueUrl)
Constructs a new SendMessageBatchRequest object.
|
SendMessageBatchRequest(java.lang.String queueUrl,
java.util.List<SendMessageBatchRequestEntry> entries)
Constructs a new SendMessageBatchRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<SendMessageBatchRequestEntry> |
getEntries()
A list of SendMessageBatchRequestEntry items.
|
java.lang.String |
getQueueUrl()
The URL of the Amazon SQS queue to take action on.
|
int |
hashCode() |
void |
setEntries(java.util.Collection<SendMessageBatchRequestEntry> entries)
A list of SendMessageBatchRequestEntry items.
|
void |
setQueueUrl(java.lang.String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SendMessageBatchRequest |
withEntries(java.util.Collection<SendMessageBatchRequestEntry> entries)
A list of SendMessageBatchRequestEntry items.
|
SendMessageBatchRequest |
withEntries(SendMessageBatchRequestEntry... entries)
A list of SendMessageBatchRequestEntry items.
|
SendMessageBatchRequest |
withQueueUrl(java.lang.String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public SendMessageBatchRequest()
public SendMessageBatchRequest(java.lang.String queueUrl)
queueUrl
- The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
public SendMessageBatchRequest(java.lang.String queueUrl, java.util.List<SendMessageBatchRequestEntry> entries)
queueUrl
- The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
entries
- A list of SendMessageBatchRequestEntry items.
public java.lang.String getQueueUrl()
The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
public void setQueueUrl(java.lang.String queueUrl)
The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
queueUrl
- The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
public SendMessageBatchRequest withQueueUrl(java.lang.String queueUrl)
The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
Returns a reference to this object so that method calls can be chained together.
queueUrl
- The URL of the Amazon SQS queue to take action on.
Queue URLs are case-sensitive.
public java.util.List<SendMessageBatchRequestEntry> getEntries()
A list of SendMessageBatchRequestEntry items.
A list of SendMessageBatchRequestEntry items.
public void setEntries(java.util.Collection<SendMessageBatchRequestEntry> entries)
A list of SendMessageBatchRequestEntry items.
entries
- A list of SendMessageBatchRequestEntry items.
public SendMessageBatchRequest withEntries(SendMessageBatchRequestEntry... entries)
A list of SendMessageBatchRequestEntry items.
Returns a reference to this object so that method calls can be chained together.
entries
- A list of SendMessageBatchRequestEntry items.
public SendMessageBatchRequest withEntries(java.util.Collection<SendMessageBatchRequestEntry> entries)
A list of SendMessageBatchRequestEntry items.
Returns a reference to this object so that method calls can be chained together.
entries
- A list of SendMessageBatchRequestEntry items.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.