TopicClient Class
An anchor class used to access a Topic to perform run-time operations.
System.Object
Microsoft.ServiceBus.Messaging.MessageClientEntity
Microsoft.ServiceBus.Messaging.TopicClient
Microsoft.ServiceBus.Messaging.MessageClientEntity
Microsoft.ServiceBus.Messaging.TopicClient
Namespace: Microsoft.ServiceBus.Messaging
Assembly: Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)
The TopicClient type exposes the following members.
| Name | Description | |
|---|---|---|
|
InternalSender | Gets or sets the message sender for the topic. |
|
IsClosed | Gets or sets a value that indicates whether the message client entity is closed. (Inherited from MessageClientEntity.) |
|
IsSubQueue | Gets or sets a value that indicates whether the message receiver is created from a subqueue. |
|
MessagingFactory | Gets or sets the messaging factory that was used in creating this TopicClient object. |
|
Path | Gets or sets the full pathname of the file. |
| Name | Description | |
|---|---|---|
|
Abort | Aborts the message client entity and puts its status into a closing state. (Inherited from MessageClientEntity.) |
|
BeginClose | Begins an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.) |
|
BeginSend | Begins an asynchronous operation to send a message. |
|
Close | Closes the message client entity and puts its status into a closed state. (Inherited from MessageClientEntity.) |
|
EndClose | Finishes an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.) |
|
EndSend | Finishes an asynchronous operation to send a message. |
|
Equals | (Inherited from Object.) |
|
Fault | Puts the message client entity into a faulted state. (Inherited from MessageClientEntity.) |
|
Finalize | (Inherited from Object.) |
|
GetHashCode | (Inherited from Object.) |
|
GetType | (Inherited from Object.) |
|
MemberwiseClone | (Inherited from Object.) |
|
OnAbort | Executes the abort action. (Overrides MessageClientEntity.OnAbort().) |
|
OnBeginClose | Executes the begin close action. (Overrides MessageClientEntity.OnBeginClose(TimeSpan, AsyncCallback, Object).) |
|
OnBeginCreateSender | Executes the begin create sender action. |
|
OnBeginOpen | Executes upon calling the operation to begin to open the message client entity. (Inherited from MessageClientEntity.) |
|
OnClose | Executes the close action. (Overrides MessageClientEntity.OnClose(TimeSpan).) |
|
OnClosed | Occurs when the message client entity is transitioned into a closing state. (Inherited from MessageClientEntity.) |
|
OnEndClose | Executes the end close action. (Overrides MessageClientEntity.OnEndClose(IAsyncResult).) |
|
OnEndCreateSender | Executes the end create sender action. |
|
OnEndOpen | Executes upon calling the operation to end to open the message client entity. (Inherited from MessageClientEntity.) |
|
OnFaulted | Executes upon calling the Fault operation. (Inherited from MessageClientEntity.) |
|
OnOpen | Executes upon calling the operation to open the message client entity. (Inherited from MessageClientEntity.) |
|
OnOpened | Executes when the message client entity is opened. (Inherited from MessageClientEntity.) |
|
Send | Sends a message using the InternalSender. |
|
ThrowIfClosed | Throws an exception if the message client entity is closed. (Inherited from MessageClientEntity.) |
|
ThrowIfDisposed | Throws an exception if the message client entity is disposed. (Inherited from MessageClientEntity.) |
|
ThrowIfDisposedOrImmutable | Throws an exception if the client is disposed or immutable. (Inherited from MessageClientEntity.) |
|
ThrowIfDisposedOrNotOpen | Throws an exception if the client is disposed or not open. (Inherited from MessageClientEntity.) |
|
ThrowIfFaulted | Throws an exception if the client is faulted. (Inherited from MessageClientEntity.) |
|
ToString | (Inherited from Object.) |
// 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 <object> Issues = new List <object>(); foreach (var issue in Issues) { myTopicClient.Send(new BrokeredMessage(issue)); }