共用方式為


ServiceBusClientBuilder.ServiceBusSenderClientBuilder Class

  • java.lang.Object
    • com.azure.messaging.servicebus.ServiceBusClientBuilder.ServiceBusSenderClientBuilder

public final class ServiceBusClientBuilder.ServiceBusSenderClientBuilder

Builder for creating ServiceBusSenderClient and ServiceBusSenderAsyncClient to publish messages to Service Bus.

Method Summary

Modifier and Type Method and Description
ServiceBusSenderAsyncClient buildAsyncClient()

Creates an asynchronous ServiceBusSenderAsyncClient for transmitting ServiceBusMessage to a Service Bus queue or topic.

ServiceBusSenderClient buildClient()

Creates a synchronous ServiceBusSenderClient for transmitting ServiceBusMessage to a Service Bus queue or topic.

ServiceBusSenderClientBuilder queueName(String queueName)

Sets the name of the Service Bus queue to publish messages to.

ServiceBusSenderClientBuilder topicName(String topicName)

Sets the name of the Service Bus topic to publish messages to.

Methods inherited from java.lang.Object

Method Details

buildAsyncClient

public ServiceBusSenderAsyncClient buildAsyncClient()

Creates an asynchronous ServiceBusSenderAsyncClient for transmitting ServiceBusMessage to a Service Bus queue or topic.

Returns:

A new ServiceBusSenderAsyncClient for transmitting to a Service queue or topic.

buildClient

public ServiceBusSenderClient buildClient()

Creates a synchronous ServiceBusSenderClient for transmitting ServiceBusMessage to a Service Bus queue or topic.

Returns:

A new ServiceBusSenderAsyncClient for transmitting to a Service queue or topic.

queueName

public ServiceBusClientBuilder.ServiceBusSenderClientBuilder queueName(String queueName)

Sets the name of the Service Bus queue to publish messages to.

Parameters:

queueName - Name of the queue.

Returns:

The modified ServiceBusSenderClientBuilder object.

topicName

public ServiceBusClientBuilder.ServiceBusSenderClientBuilder topicName(String topicName)

Sets the name of the Service Bus topic to publish messages to.

Parameters:

topicName - Name of the topic.

Returns:

The modified ServiceBusSenderClientBuilder object.

Applies to