Megosztás a következőn keresztül:


ITopicClient Interface

Definition

TopicClient can be used for all basic interactions with a Service Bus topic.

public interface ITopicClient : Microsoft.Azure.ServiceBus.Core.ISenderClient
type ITopicClient = interface
    interface ISenderClient
    interface IClientEntity
Public Interface ITopicClient
Implements ISenderClient
Derived
Implements

Examples

Create a new TopicClient

ITopicClient topicClient = new TopicClient(
    namespaceConnectionString,
    topicName,
    RetryExponential);

Send a message to the topic:

byte[] data = GetData();
await topicClient.SendAsync(data);

Properties

ClientId

Gets the ID to identify this client. This can be used to correlate logs and exceptions.

(Inherited from IClientEntity)
IsClosedOrClosing

Returns true if the client is closed or closing.

(Inherited from IClientEntity)
OperationTimeout

Duration after which individual operations will timeout.

(Inherited from IClientEntity)
OwnsConnection

Returns true if connection is owned and false if connection is shared.

(Inherited from IClientEntity)
Path

Gets the entity path.

(Inherited from IClientEntity)
RegisteredPlugins

Gets a list of currently registered plugins for this client.

(Inherited from IClientEntity)
ServiceBusConnection

Connection object to the service bus namespace.

(Inherited from IClientEntity)
TopicName

Gets the name of the topic.

Methods

CancelScheduledMessageAsync(Int64)

Cancels a message that was scheduled.

(Inherited from ISenderClient)
CloseAsync()

Closes the Client. Closes the connections opened by it.

(Inherited from IClientEntity)
RegisterPlugin(ServiceBusPlugin)

Registers a ServiceBusPlugin to be used with this client.

(Inherited from IClientEntity)
ScheduleMessageAsync(Message, DateTimeOffset)

Schedules a message to appear on Service Bus.

(Inherited from ISenderClient)
SendAsync(IList<Message>)

Sends a list of messages to Service Bus. When called on partitioned entities, messages meant for different partitions cannot be batched together.

(Inherited from ISenderClient)
SendAsync(Message)

Sends a message to Service Bus.

(Inherited from ISenderClient)
UnregisterPlugin(String)

Unregisters a ServiceBusPlugin.

(Inherited from IClientEntity)

Applies to