TopicClient TopicClient TopicClient TopicClient TopicClient TopicClient Class

Definition

An anchor class used to access a TopicDescription to perform run-time operations.

public ref class TopicClient abstract : Microsoft::ServiceBus::Messaging::ClientEntity
[Windows::Foundation::Metadata::WebHostHidden]
public ref class TopicClient abstract : Microsoft::ServiceBus::Messaging::ClientEntity
[Windows::Foundation::Metadata::WebHostHidden]
class TopicClient abstract : Microsoft::ServiceBus::Messaging::ClientEntity
public abstract class TopicClient : Microsoft.ServiceBus.Messaging.ClientEntity
type TopicClient = class
    inherit ClientEntity
    interface IMessageSender
    interface IMessageBrowser
Public MustInherit Class TopicClient
Inherits ClientEntity
Inheritance

Examples


             // Create settings for the MessagingFactory (for rutime operations)
             MessagingFactorySettings factorySettings = new MessagingFactorySettings()
             {
                NetMessagingTransportSettings = new NetMessagingTransportSettings(),
                Credential = TransportClientCredentialBase.CreateSharedSecretCredential(IssuerName, IssuerKey),
             };

             // Create the MessagingFactory
             MessagingFactory factory = 
             MessagingFactory.Create(myServiceBusNamespace, factorySettings);

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

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

             // Create a sender
             //MessageSender myMessageSender = myTopicClient.CreateSender(SendMode.Default);

             // Send messages
             List <object> Issues = new List <object>();
             foreach (var issue in Issues)
             {
                myMessageSender.Send(new BrokeredMessage(issue));
             }
             

Properties

IsClosed IsClosed IsClosed IsClosed IsClosed IsClosed Inherited from ClientEntity
IsSubQueue IsSubQueue IsSubQueue IsSubQueue IsSubQueue IsSubQueue

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

MessagingFactory MessagingFactory MessagingFactory MessagingFactory MessagingFactory MessagingFactory

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

Path Path Path Path Path Path

Gets or sets the full pathname of the file.

RetryPolicy RetryPolicy RetryPolicy RetryPolicy RetryPolicy RetryPolicy Inherited from ClientEntity
ThisLock ThisLock ThisLock ThisLock ThisLock ThisLock Inherited from ClientEntity

Methods

Abort() Abort() Abort() Abort() Abort() Abort()

Performs abort functionality on the messaging entity.

(Inherited from ClientEntity)
CancelScheduledMessageAsync(Int64) CancelScheduledMessageAsync(Int64) CancelScheduledMessageAsync(Int64) CancelScheduledMessageAsync(Int64) CancelScheduledMessageAsync(Int64) CancelScheduledMessageAsync(Int64)

Cancels a scheduled message

Close() Close() Close() Close() Close() Close()

Sends a cleanup message to Service Bus to signal the completion of the usage of an entity.

(Inherited from ClientEntity)
CloseAsync() CloseAsync() CloseAsync() CloseAsync() CloseAsync() CloseAsync()

Sends a cleanup message asynchronously to Service Bus to signal the completion of the usage of an entity.

(Inherited from ClientEntity)
Create(String) Create(String) Create(String) Create(String) Create(String) Create(String)

Creates a new instance of TopicClient.

Create(Uri, String, AuthenticationContext, ClientAssertionCertificate, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientAssertionCertificate, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientAssertionCertificate, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientAssertionCertificate, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientAssertionCertificate, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientAssertionCertificate, Nullable<TimeSpan>, TransportType)

Creates a new instance of the TopicClient by using Azure Active Directory authentication context.

Create(Uri, String, AuthenticationContext, ClientCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, ClientCredential, Nullable<TimeSpan>, TransportType)

Creates a new instance of the TopicClient by using Azure Active Directory authentication context.

Create(Uri, String, AuthenticationContext, String, Uri, IPlatformParameters, UserIdentifier, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, Uri, IPlatformParameters, UserIdentifier, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, Uri, IPlatformParameters, UserIdentifier, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, Uri, IPlatformParameters, UserIdentifier, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, Uri, IPlatformParameters, UserIdentifier, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, Uri, IPlatformParameters, UserIdentifier, Nullable<TimeSpan>, TransportType)

Creates a new instance of the TopicClient by using Azure Active Directory authentication context.

Create(Uri, String, AuthenticationContext, String, UserPasswordCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, UserPasswordCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, UserPasswordCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, UserPasswordCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, UserPasswordCredential, Nullable<TimeSpan>, TransportType) Create(Uri, String, AuthenticationContext, String, UserPasswordCredential, Nullable<TimeSpan>, TransportType)

Creates a new instance of the TopicClient by using Azure Active Directory authentication context.

CreateFromConnectionString(String) CreateFromConnectionString(String) CreateFromConnectionString(String) CreateFromConnectionString(String) CreateFromConnectionString(String) CreateFromConnectionString(String)

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

CreateFromConnectionString(String, String) CreateFromConnectionString(String, String) CreateFromConnectionString(String, String) CreateFromConnectionString(String, String) CreateFromConnectionString(String, String) CreateFromConnectionString(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.

CreateWithManagedServiceIdentity(Uri, String, Nullable<TimeSpan>, TransportType) CreateWithManagedServiceIdentity(Uri, String, Nullable<TimeSpan>, TransportType) CreateWithManagedServiceIdentity(Uri, String, Nullable<TimeSpan>, TransportType) CreateWithManagedServiceIdentity(Uri, String, Nullable<TimeSpan>, TransportType) CreateWithManagedServiceIdentity(Uri, String, Nullable<TimeSpan>, TransportType) CreateWithManagedServiceIdentity(Uri, String, Nullable<TimeSpan>, TransportType)

Creates a new instance of the TopicClient by using Azure Managed Service Identity authentication.

Fault() Fault() Fault() Fault() Fault() Fault()

For internal use only. Do not inherit from this class.

(Inherited from ClientEntity)
FormatTransferDeadLetterPath(String) FormatTransferDeadLetterPath(String) FormatTransferDeadLetterPath(String) FormatTransferDeadLetterPath(String) FormatTransferDeadLetterPath(String) FormatTransferDeadLetterPath(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.

OnAbort() OnAbort() OnAbort() OnAbort() OnAbort() OnAbort()

Executes the abort action.

OnBeginClose(TimeSpan, AsyncCallback, Object) OnBeginClose(TimeSpan, AsyncCallback, Object) OnBeginClose(TimeSpan, AsyncCallback, Object) OnBeginClose(TimeSpan, AsyncCallback, Object) OnBeginClose(TimeSpan, AsyncCallback, Object) OnBeginClose(TimeSpan, AsyncCallback, Object)

Executes the begin close action.

OnBeginCreateSender(TimeSpan, AsyncCallback, Object) OnBeginCreateSender(TimeSpan, AsyncCallback, Object) OnBeginCreateSender(TimeSpan, AsyncCallback, Object) OnBeginCreateSender(TimeSpan, AsyncCallback, Object) OnBeginCreateSender(TimeSpan, AsyncCallback, Object) OnBeginCreateSender(TimeSpan, AsyncCallback, Object)

Executes the begin create sender action.

OnBeginOpen(TimeSpan, AsyncCallback, Object) OnBeginOpen(TimeSpan, AsyncCallback, Object) OnBeginOpen(TimeSpan, AsyncCallback, Object) OnBeginOpen(TimeSpan, AsyncCallback, Object) OnBeginOpen(TimeSpan, AsyncCallback, Object) OnBeginOpen(TimeSpan, AsyncCallback, Object) Inherited from ClientEntity
OnClose(TimeSpan) OnClose(TimeSpan) OnClose(TimeSpan) OnClose(TimeSpan) OnClose(TimeSpan) OnClose(TimeSpan)

Executes the close action.

OnClosed() OnClosed() OnClosed() OnClosed() OnClosed() OnClosed() Inherited from ClientEntity
OnEndClose(IAsyncResult) OnEndClose(IAsyncResult) OnEndClose(IAsyncResult) OnEndClose(IAsyncResult) OnEndClose(IAsyncResult) OnEndClose(IAsyncResult)

Executes the end close action.

OnEndCreateSender(IAsyncResult) OnEndCreateSender(IAsyncResult) OnEndCreateSender(IAsyncResult) OnEndCreateSender(IAsyncResult) OnEndCreateSender(IAsyncResult) OnEndCreateSender(IAsyncResult)

Executes the end create sender action.

OnEndOpen(IAsyncResult) OnEndOpen(IAsyncResult) OnEndOpen(IAsyncResult) OnEndOpen(IAsyncResult) OnEndOpen(IAsyncResult) OnEndOpen(IAsyncResult) Inherited from ClientEntity
OnFaulted() OnFaulted() OnFaulted() OnFaulted() OnFaulted() OnFaulted() Inherited from ClientEntity
OnOpen(TimeSpan) OnOpen(TimeSpan) OnOpen(TimeSpan) OnOpen(TimeSpan) OnOpen(TimeSpan) OnOpen(TimeSpan) Inherited from ClientEntity
OnOpened() OnOpened() OnOpened() OnOpened() OnOpened() OnOpened() Inherited from ClientEntity
Peek() Peek() Peek() Peek() Peek() Peek()

Peeks a BrokeredMessage from current queue/topic.

Peek(Int64) Peek(Int64) Peek(Int64) Peek(Int64) Peek(Int64) Peek(Int64)

Peeks a BrokeredMessage from current queue/topic.

PeekAsync() PeekAsync() PeekAsync() PeekAsync() PeekAsync() PeekAsync()
PeekAsync(Int64) PeekAsync(Int64) PeekAsync(Int64) PeekAsync(Int64) PeekAsync(Int64) PeekAsync(Int64)
PeekBatch(Int32) PeekBatch(Int32) PeekBatch(Int32) PeekBatch(Int32) PeekBatch(Int32) PeekBatch(Int32)

Peeks a BrokeredMessage from current queue/topic.

PeekBatch(Int64, Int32) PeekBatch(Int64, Int32) PeekBatch(Int64, Int32) PeekBatch(Int64, Int32) PeekBatch(Int64, Int32) PeekBatch(Int64, Int32)
PeekBatchAsync(Int32) PeekBatchAsync(Int32) PeekBatchAsync(Int32) PeekBatchAsync(Int32) PeekBatchAsync(Int32) PeekBatchAsync(Int32)
PeekBatchAsync(Int64, Int32) PeekBatchAsync(Int64, Int32) PeekBatchAsync(Int64, Int32) PeekBatchAsync(Int64, Int32) PeekBatchAsync(Int64, Int32) PeekBatchAsync(Int64, Int32)
ScheduleMessageAsync(BrokeredMessage, DateTimeOffset) ScheduleMessageAsync(BrokeredMessage, DateTimeOffset) ScheduleMessageAsync(BrokeredMessage, DateTimeOffset) ScheduleMessageAsync(BrokeredMessage, DateTimeOffset) ScheduleMessageAsync(BrokeredMessage, DateTimeOffset) ScheduleMessageAsync(BrokeredMessage, DateTimeOffset)

Sends a scheduled message

Send(BrokeredMessage) Send(BrokeredMessage) Send(BrokeredMessage) Send(BrokeredMessage) Send(BrokeredMessage) Send(BrokeredMessage)

Sends a message using the Microsoft.ServiceBus.Messaging.TopicClient.InternalSender.

SendAsync(BrokeredMessage) SendAsync(BrokeredMessage) SendAsync(BrokeredMessage) SendAsync(BrokeredMessage) SendAsync(BrokeredMessage) SendAsync(BrokeredMessage)

Asynchronously sends a message using the Microsoft.ServiceBus.Messaging.TopicClient.InternalSender.

SendBatch(IEnumerable<BrokeredMessage>) SendBatch(IEnumerable<BrokeredMessage>) SendBatch(IEnumerable<BrokeredMessage>) SendBatch(IEnumerable<BrokeredMessage>) SendBatch(IEnumerable<BrokeredMessage>) SendBatch(IEnumerable<BrokeredMessage>)

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

SendBatchAsync(IEnumerable<BrokeredMessage>) SendBatchAsync(IEnumerable<BrokeredMessage>) SendBatchAsync(IEnumerable<BrokeredMessage>) SendBatchAsync(IEnumerable<BrokeredMessage>) SendBatchAsync(IEnumerable<BrokeredMessage>) SendBatchAsync(IEnumerable<BrokeredMessage>)

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

ThrowIfClosed() ThrowIfClosed() ThrowIfClosed() ThrowIfClosed() ThrowIfClosed() ThrowIfClosed() Inherited from ClientEntity
ThrowIfDisposed() ThrowIfDisposed() ThrowIfDisposed() ThrowIfDisposed() ThrowIfDisposed() ThrowIfDisposed() Inherited from ClientEntity
ThrowIfDisposedOrImmutable() ThrowIfDisposedOrImmutable() ThrowIfDisposedOrImmutable() ThrowIfDisposedOrImmutable() ThrowIfDisposedOrImmutable() ThrowIfDisposedOrImmutable() Inherited from ClientEntity
ThrowIfDisposedOrNotOpen() ThrowIfDisposedOrNotOpen() ThrowIfDisposedOrNotOpen() ThrowIfDisposedOrNotOpen() ThrowIfDisposedOrNotOpen() ThrowIfDisposedOrNotOpen() Inherited from ClientEntity
ThrowIfFaulted() ThrowIfFaulted() ThrowIfFaulted() ThrowIfFaulted() ThrowIfFaulted() ThrowIfFaulted() Inherited from ClientEntity

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object) IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object) IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

Applies to

See Also