Class CreateMessageBatchOptions
java.lang.Object
com.azure.messaging.servicebus.models.CreateMessageBatchOptions
The set of options that can be specified when creating an batch of messages. This wrapper will help to limit
the messages with maximum allowed size.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of options to specify when creating aServiceBusMessageBatch
. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the maximum size to allow for the batch of messages, in bytes.setMaximumSizeInBytes
(int maximumSizeInBytes) Sets the maximum size for the batch of messages.
-
Constructor Details
-
CreateMessageBatchOptions
public CreateMessageBatchOptions()Creates a new instance of options to specify when creating aServiceBusMessageBatch
.
-
-
Method Details
-
setMaximumSizeInBytes
Sets the maximum size for the batch of messages.- Parameters:
maximumSizeInBytes
- The maximum size to allow for the batch of messages.- Returns:
- The updated
CreateMessageBatchOptions
object.
-
getMaximumSizeInBytes
public int getMaximumSizeInBytes()Gets the maximum size to allow for the batch of messages, in bytes.- Returns:
- The maximum size to allow for a single batch of messages, in bytes.
-