CreateMessageBatchOptions Class

  • java.lang.Object
    • com.azure.messaging.servicebus.models.CreateMessageBatchOptions

public final class 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.

Constructor Summary

Constructor Description
CreateMessageBatchOptions()

Creates a new instance of options to specify when creating a ServiceBusMessageBatch.

Method Summary

Modifier and Type Method and Description
int getMaximumSizeInBytes()

Gets the maximum size to allow for the batch of messages, in bytes.

CreateMessageBatchOptions setMaximumSizeInBytes(int maximumSizeInBytes)

Sets the maximum size for the batch of messages.

Methods inherited from java.lang.Object

Constructor Details

CreateMessageBatchOptions

public CreateMessageBatchOptions()

Creates a new instance of options to specify when creating a ServiceBusMessageBatch.

Method Details

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.

setMaximumSizeInBytes

public CreateMessageBatchOptions setMaximumSizeInBytes(int maximumSizeInBytes)

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.

Applies to