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 the TopicClient
ITopicClient myTopicClient = new TopicClient(
    serviceBusConnectionString,
    topicName);

//********************************************************************************
//                          Sending messages to a Topic
//********************************************************************************

// Send messages
List <byte[]> Issues = GetIssues();
foreach (var issue in Issues)
{
   myTopicClient.SendAsync(new Message(issue));
}

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

TopicName

Gets the name of the topic.

Methods

CancelScheduledMessageAsync(Int64)

Cancels a message that was scheduled.

(Inherited from ISenderClient)
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.

(Inherited from ISenderClient)
SendAsync(Message)

Sends a message to Service Bus.

(Inherited from ISenderClient)

Applies to