TopicClient.sendBatch 方法

定义

重载

sendBatch(Collection<? extends IMessage> messages)

Sends a batch of messages to the Azure Service Bus entity this sender is connected to. This method blocks until the batch is sent to the entity. Calling this method is equivalent to calling . For better performance, use async methods.

sendBatch(Collection<? extends IMessage> messages, TransactionContext transaction)

Sends a batch of messages to the Azure Service Bus entity this sender is connected to. This method blocks until the batch is sent to the entity. Calling this method is equivalent to calling . For better performance, use async methods.

sendBatch(Collection<? extends IMessage> messages)

Sends a batch of messages to the Azure Service Bus entity this sender is connected to. This method blocks until the batch is sent to the entity. Calling this method is equivalent to calling . For better performance, use async methods.

public void sendBatch(Collection<? extends IMessage> messages)

参数

messages
Collection<? extends IMessage>

collection of messages to be sent to the entity

例外

InterruptedException

if the current thread was interrupted while waiting

ServiceBusException

if the batch couldn't be sent to the entity

替代

sendBatch(Collection<? extends IMessage> messages, TransactionContext transaction)

Sends a batch of messages to the Azure Service Bus entity this sender is connected to. This method blocks until the batch is sent to the entity. Calling this method is equivalent to calling . For better performance, use async methods.

public void sendBatch(Collection<? extends IMessage> messages, TransactionContext transaction)

参数

messages
Collection<? extends IMessage>

collection of messages to be sent to the entity

transaction
TransactionContext

TransactionContext which this operation should enlist to.

例外

InterruptedException

if the current thread was interrupted while waiting

ServiceBusException

if the batch couldn't be sent to the entity

替代

适用于