public final class ServiceBusClientBuilder.ServiceBusSenderClientBuilder extends Object
ServiceBusSenderClient
and ServiceBusSenderAsyncClient
to publish messages
to Service Bus.Modifier and Type | Method and Description |
---|---|
ServiceBusSenderAsyncClient |
buildAsyncClient()
Creates an asynchronous
client for transmitting ServiceBusMessage to a Service Bus queue or topic. |
ServiceBusSenderClient |
buildClient()
Creates a synchronous
client for transmitting ServiceBusMessage
to a Service Bus queue or topic. |
ServiceBusClientBuilder.ServiceBusSenderClientBuilder |
queueName(String queueName)
Sets the name of the Service Bus queue to publish messages to.
|
ServiceBusClientBuilder.ServiceBusSenderClientBuilder |
topicName(String topicName)
Sets the name of the Service Bus topic to publish messages to.
|
public ServiceBusClientBuilder.ServiceBusSenderClientBuilder queueName(String queueName)
queueName
- Name of the queue.ServiceBusClientBuilder.ServiceBusSenderClientBuilder
object.public ServiceBusClientBuilder.ServiceBusSenderClientBuilder topicName(String topicName)
topicName
- Name of the topic.ServiceBusClientBuilder.ServiceBusSenderClientBuilder
object.public ServiceBusSenderAsyncClient buildAsyncClient()
client
for transmitting ServiceBusMessage
to a Service Bus queue or topic.ServiceBusSenderAsyncClient
for transmitting to a Service queue or topic.IllegalStateException
- if queueName
or topicName
are not set or, both of these fields are set. It is also thrown if the Service Bus connectionString
contains an EntityPath
that does not match one set in
queueName
or topicName
IllegalArgumentException
- if the entity type is not a queue or a topic.public ServiceBusSenderClient buildClient()
client
for transmitting ServiceBusMessage
to a Service Bus queue or topic.ServiceBusSenderAsyncClient
for transmitting to a Service queue or topic.IllegalStateException
- if queueName
or topicName
are not set or, both of these fields are set. It is also thrown if the Service Bus connectionString
contains an EntityPath
that does not match one set in
queueName
or topicName
IllegalArgumentException
- if the entity type is not a queue or a topic.Copyright © 2020 Microsoft Corporation. All rights reserved.