Modifier and Type | Method and Description |
---|---|
int |
getCount()
Gets the number of
messages in the batch. |
int |
getMaxSizeInBytes()
Gets the maximum size, in bytes, of the
batch . |
int |
getSizeInBytes()
Gets the size of the
batch in bytes. |
boolean |
tryAddMessage(ServiceBusMessage serviceBusMessage)
Tries to add an
message to the batch. |
public int getCount()
messages
in the batch.messages
in the batch.public int getMaxSizeInBytes()
batch
.batch
.public int getSizeInBytes()
batch
in bytes.batch
in bytes.public boolean tryAddMessage(ServiceBusMessage serviceBusMessage)
message
to the batch.serviceBusMessage
- The ServiceBusMessage
to add to the batch.true
if the message could be added to the batch; false
if the event was too large to fit
in the batch.NullPointerException
- if message
is null
.AmqpException
- if message
is larger than the maximum size of the ServiceBusMessageBatch
.Copyright © 2021 Microsoft Corporation. All rights reserved.