EventHubClient.sendSync 方法

定义

重载

sendSync(final EventData data)

Synchronous version of send(final EventData data).

sendSync(final EventData eventData, final String partitionKey)

Synchronous version of send(final EventData eventData, final String partitionKey).

sendSync(final EventDataBatch eventDatas)

Synchronous version of send(final EventDataBatch eventDatas).

sendSync(final Iterable<EventData> eventDatas)

Synchronous version of send(Iterable).

sendSync(final Iterable<EventData> eventDatas, final String partitionKey)

Synchronous version of send(Iterable, String).

sendSync(final EventData data)

Synchronous version of send(final EventData data).

public default void sendSync(final EventData data)

参数

data
final EventData

the EventData to be sent.

返回

default void

例外

PayloadSizeExceededException

if the total size of the EventData exceeds a predefined limit set by the service. Default is 256k bytes.

EventHubException

if Service Bus service encountered problems during the operation.

UnresolvedAddressException

if there are Client to Service network connectivity issues, if the Azure DNS resolution of the ServiceBus Namespace fails (ex: namespace deleted etc.)

sendSync(final EventData eventData, final String partitionKey)

public default void sendSync(final EventData eventData, final String partitionKey)

参数

eventData
final EventData

the EventData to be sent.

partitionKey
final String

the partitionKey will be hash'ed to determine the partitionId to send the eventData to. On the Received message this can be accessed at EventData.SystemProperties#getPartitionKey()

返回

default void

例外

PayloadSizeExceededException

if the total size of the EventData exceeds a pre-defined limit set by the service. Default is 256k bytes.

EventHubException

if Service Bus service encountered problems during the operation.

sendSync(final EventDataBatch eventDatas)

Synchronous version of send(final EventDataBatch eventDatas).

public default void sendSync(final EventDataBatch eventDatas)

参数

eventDatas
final EventDataBatch

EventDataBatch to send to EventHub

返回

default void

例外

EventHubException

if Service Bus service encountered problems during the operation.

sendSync(final Iterable<EventData> eventDatas)

Synchronous version of send(Iterable).

public default void sendSync(final Iterable<EventData> eventDatas)

参数

eventDatas
final Iterable<EventData>

batch of events to send to EventHub

返回

default void

例外

PayloadSizeExceededException

if the total size of the EventData exceeds a pre-defined limit set by the service. Default is 256k bytes.

EventHubException

if Service Bus service encountered problems during the operation.

UnresolvedAddressException

if there are Client to Service network connectivity issues, if the Azure DNS resolution of the ServiceBus Namespace fails (ex: namespace deleted etc.)

sendSync(final Iterable<EventData> eventDatas, final String partitionKey)

Synchronous version of send(Iterable, String).

public default void sendSync(final Iterable<EventData> eventDatas, final String partitionKey)

参数

eventDatas
final Iterable<EventData>

the batch of events to send to EventHub

partitionKey
final String

the partitionKey will be hash'ed to determine the partitionId to send the eventData to. On the Received message this can be accessed at EventData.SystemProperties#getPartitionKey()

返回

default void

例外

PayloadSizeExceededException

if the total size of the EventData exceeds a pre-defined limit set by the service. Default is 256k bytes.

EventHubException

if Service Bus service encountered problems during the operation.

UnresolvedAddressException

if there are Client to Service network connectivity issues, if the Azure DNS resolution of the ServiceBus Namespace fails (ex: namespace deleted etc.)

适用于