SALES: 1-800-867-1380
TopicClient Class
TOC
Collapse the table of content
Expand the table of content

TopicClient Class

 

An anchor class used to access a T:Microsoft.ServiceBus.Messaging.Topic to perform run-time operations.

Namespace:   Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

System.Object
  Microsoft.ServiceBus.Messaging.ClientEntity
    Microsoft.ServiceBus.Messaging.TopicClient

public abstract class TopicClient : ClientEntity

NameDescription
System_CAPS_pubpropertyIsClosed

(Inherited from ClientEntity.)

System_CAPS_protpropertyIsSubQueue

Gets or sets a value that indicates whether the message receiver is created from a subqueue.

System_CAPS_pubpropertyMessagingFactory

Gets or sets the messaging factory that was used in creating this TopicClient object.

System_CAPS_pubpropertyPath

Gets or sets the full pathname of the file.

System_CAPS_pubpropertyRetryPolicy

(Inherited from ClientEntity.)

System_CAPS_protpropertyThisLock

(Inherited from ClientEntity.)

NameDescription
System_CAPS_pubmethodAbort()

Performs abort functionality on the messaging entity.(Inherited from ClientEntity.)

System_CAPS_pubmethodCancelScheduledMessageAsync(Int64)

Cancels a scheduled message.

System_CAPS_pubmethodClose()

Sends a cleanup message to Service Bus to signal the completion of the usage of an entity.(Inherited from ClientEntity.)

System_CAPS_pubmethodCloseAsync()

Sends a cleanup message asynchronously to Service Bus to signal the completion of the usage of an entity.(Inherited from ClientEntity.)

System_CAPS_pubmethodSystem_CAPS_staticCreate(String)

Creates a new instance of TopicClient.

System_CAPS_pubmethodSystem_CAPS_staticCreateFromConnectionString(String)

Creates a new instance of TopicClient using the specified connection string.

System_CAPS_pubmethodSystem_CAPS_staticCreateFromConnectionString(String, String)

Creates a new instance of TopicClient using the specified connection string and path to the topic. Use this overload only when the connection string does not use the EntityPath property.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFault()

For internal use only. Do not inherit from this class.(Inherited from ClientEntity.)

System_CAPS_protmethodFinalize()

(Inherited from ClientEntity.)

System_CAPS_pubmethodSystem_CAPS_staticFormatTransferDeadLetterPath(String)

A utility method that, given the topic path and subscription name, forms a full path that points to the dead letter queue of the topic's transfer topic.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodOnAbort()

Executes the abort action.(Overrides ClientEntity.OnAbort().)

System_CAPS_protmethodOnBeginClose(TimeSpan, AsyncCallback, Object)

Executes the begin close action.(Overrides ClientEntity.OnBeginClose(TimeSpan, AsyncCallback, Object).)

System_CAPS_protmethodOnBeginCreateSender(TimeSpan, AsyncCallback, Object)

Executes the begin create sender action.

System_CAPS_protmethodOnBeginOpen(TimeSpan, AsyncCallback, Object)

(Inherited from ClientEntity.)

System_CAPS_protmethodOnClose(TimeSpan)

Executes the close action.(Overrides ClientEntity.OnClose(TimeSpan).)

System_CAPS_protmethodOnClosed()

(Inherited from ClientEntity.)

System_CAPS_protmethodOnEndClose(IAsyncResult)

Executes the end close action.(Overrides ClientEntity.OnEndClose(IAsyncResult).)

System_CAPS_protmethodOnEndCreateSender(IAsyncResult)

Executes the end create sender action.

System_CAPS_protmethodOnEndOpen(IAsyncResult)

(Inherited from ClientEntity.)

System_CAPS_protmethodOnFaulted()

(Inherited from ClientEntity.)

System_CAPS_protmethodOnOpen(TimeSpan)

(Inherited from ClientEntity.)

System_CAPS_protmethodOnOpened()

(Inherited from ClientEntity.)

System_CAPS_pubmethodPeek()

System_CAPS_pubmethodPeek(Int64)

System_CAPS_pubmethodPeekAsync()

System_CAPS_pubmethodPeekAsync(Int64)

System_CAPS_pubmethodPeekBatch(Int32)

System_CAPS_pubmethodPeekBatch(Int64, Int32)

System_CAPS_pubmethodPeekBatchAsync(Int32)

System_CAPS_pubmethodPeekBatchAsync(Int64, Int32)

System_CAPS_pubmethodScheduleMessageAsync(BrokeredMessage, DateTimeOffset)

Schedules a message to be sent.

System_CAPS_pubmethodSend(BrokeredMessage)
System_CAPS_pubmethodSendAsync(BrokeredMessage)

Asynchronously sends a message using the P:Microsoft.ServiceBus.Messaging.QueueClient.InternalSender.

System_CAPS_pubmethodSendBatch(IEnumerable<BrokeredMessage>)

Sends a set of brokered messages (for batch processing).

System_CAPS_pubmethodSendBatchAsync(IEnumerable<BrokeredMessage>)

Asynchronously sends a set of brokered messages (for batch processing).

System_CAPS_protmethodThrowIfClosed()

(Inherited from ClientEntity.)

System_CAPS_protmethodThrowIfDisposed()

(Inherited from ClientEntity.)

System_CAPS_protmethodThrowIfDisposedOrImmutable()

(Inherited from ClientEntity.)

System_CAPS_protmethodThrowIfDisposedOrNotOpen()

(Inherited from ClientEntity.)

System_CAPS_protmethodThrowIfFaulted()

(Inherited from ClientEntity.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This abstract class is not meant to be inherited, so protected members of this class should be ignored.

// Create the MessagingFactory
MessagingFactory factory = 
MessagingFactory.Create(myServiceBusNamespaceUri, SharedSecretTokenProvider.CreateSharedSecretTokenProvider(issuerName, issuerKey));

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

// Create topic client
TopicClient myTopicClient = factory.CreateTopicClient(myTopic);

// Send messages
List &lt;object&gt; Issues = new List &lt;object&gt;();
foreach (var issue in Issues)
{
   myTopicClient.Send(new BrokeredMessage(issue));
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Instance members are also guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft