TopicClient TopicClient Class

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

Syntax

Declaration

public abstract class TopicClient : ClientEntity, IMessageClientEntity, ICloseable, IMessageSender, IMessageBrowserPublic MustInherit Class TopicClient
    Inherits ClientEntity
    Implements IMessageClientEntity, ICloseable, IMessageSender, IMessageBrowser

Inheritance Hierarchy

Inherited Members

, , , , , ,
Abort()
Abort()
,
Abort()
Abort()
,
Close()
Close()
,
Close()
Close()
, , ,
Fault()
Fault()
,
Fault()
Fault()
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Properties summary

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

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

Gets or sets the full pathname of the file.

Methods summary

Cancels a scheduled message

Creates a new instance of TopicClient.

Creates a new instance of TopicClient using the specified connection 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.

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.

Executes the abort action.

Executes the begin close action.

Executes the begin create sender action.

Executes the close action.

Executes the end close action.

Executes the end create sender action.

Sends a scheduled message

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

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

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

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

Properties

  • IsSubQueue
    IsSubQueue

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

    protected bool IsSubQueue { get; }Protected ReadOnly Property IsSubQueue As Boolean

    Property Value

    • true if the message receiver is created from a subqueue; otherwise, false.

  • MessagingFactory
    MessagingFactory

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

    public MessagingFactory MessagingFactory { get; }Public ReadOnly Property MessagingFactory As MessagingFactory

    Property Value

  • Path
    Path

    Gets or sets the full pathname of the file.

    public string Path { get; }Public ReadOnly Property Path As String

    Property Value

Methods

  • CancelScheduledMessageAsync(Int64)
    CancelScheduledMessageAsync(Int64)

    Cancels a scheduled message

    public Task CancelScheduledMessageAsync(long sequenceNumber)Public Function CancelScheduledMessageAsync(sequenceNumber As Long) As Task

    Parameters

    • sequenceNumber

      Returned on scheduling a message.

    Returns

  • Create(String)
    Create(String)

    Creates a new instance of TopicClient.

    public static TopicClient Create(string path)Public Shared Function Create(path As String) As TopicClient

    Parameters

    Returns

  • CreateFromConnectionString(String)
    CreateFromConnectionString(String)

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

    public static TopicClient CreateFromConnectionString(string connectionString)Public Shared Function CreateFromConnectionString(connectionString As String) As TopicClient

    Parameters

    • connectionString

      The connection string to use.

    Returns

  • 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.

    public static TopicClient CreateFromConnectionString(string connectionString, string path)Public Shared Function CreateFromConnectionString(connectionString As String, path As String) As TopicClient

    Parameters

    Returns

    Exceptions

  • 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.

    public static string FormatTransferDeadLetterPath(string topicPath)Public Shared Function FormatTransferDeadLetterPath(topicPath As String) As String

    Parameters

    Returns

    • Returns a String representing a full path that points to the dead letter queue of the transfer topic of the specified topic. This path can be used in receiver creation or in URI formation (such as a REST URI).

  • OnAbort()
    OnAbort()

    Executes the abort action.

    protected override void OnAbort()Protected Overrides Sub OnAbort
  • OnBeginClose(TimeSpan, AsyncCallback, Object)
    OnBeginClose(TimeSpan, AsyncCallback, Object)

    Executes the begin close action.

    protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state)Protected Overrides Function OnBeginClose(timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    • timeout

      The wait time before the operation times out.

    • callback

      An AsyncCallback delegate that references the method to invoke when the operation is complete.

    • state

      A user-defined object that contains information about the receive operation. This object is passed to the EndClose delegate when the operation is complete.

    Returns

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

    Executes the begin create sender action.

    protected abstract IAsyncResult OnBeginCreateSender(TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginCreateSender(timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    • timeout

      The wait time before the operation times out.

    • callback

      An AsyncCallback delegate that references the method to invoke when the operation is complete.

    • state

      A user-defined object that contains information about the receive operation. This object is passed to the Microsoft.ServiceBus.Messaging.TopicClient.EndCreateSender(System.IAsyncResult) when the operation is complete.

    Returns

  • OnClose(TimeSpan)
    OnClose(TimeSpan)

    Executes the close action.

    protected override void OnClose(TimeSpan timeout)Protected Overrides Sub OnClose(timeout As TimeSpan)

    Parameters

  • OnEndClose(IAsyncResult)
    OnEndClose(IAsyncResult)

    Executes the end close action.

    protected override void OnEndClose(IAsyncResult result)Protected Overrides Sub OnEndClose(result As IAsyncResult)

    Parameters

  • OnEndCreateSender(IAsyncResult)
    OnEndCreateSender(IAsyncResult)

    Executes the end create sender action.

    protected abstract MessageSender OnEndCreateSender(IAsyncResult result)Protected MustOverride Function OnEndCreateSender(result As IAsyncResult) As MessageSender

    Parameters

    Returns

  • Peek()
    Peek()
    public BrokeredMessage Peek()Public Function Peek As BrokeredMessage

    Returns

  • Peek(Int64)
    Peek(Int64)
    public BrokeredMessage Peek(long fromSequenceNumber)Public Function Peek(fromSequenceNumber As Long) As BrokeredMessage

    Parameters

    Returns

  • PeekAsync()
    PeekAsync()
    public Task<BrokeredMessage> PeekAsync()Public Function PeekAsync As Task(Of BrokeredMessage)

    Returns

  • PeekAsync(Int64)
    PeekAsync(Int64)
    public Task<BrokeredMessage> PeekAsync(long fromSequenceNumber)Public Function PeekAsync(fromSequenceNumber As Long) As Task(Of BrokeredMessage)

    Parameters

    Returns

  • PeekBatch(Int32)
    PeekBatch(Int32)
    public IEnumerable<BrokeredMessage> PeekBatch(int messageCount)Public Function PeekBatch(messageCount As Integer) As IEnumerable(Of BrokeredMessage)

    Parameters

    Returns

  • PeekBatch(Int64, Int32)
    PeekBatch(Int64, Int32)
    public IEnumerable<BrokeredMessage> PeekBatch(long fromSequenceNumber, int messageCount)Public Function PeekBatch(fromSequenceNumber As Long, messageCount As Integer) As IEnumerable(Of BrokeredMessage)

    Parameters

    Returns

  • PeekBatchAsync(Int32)
    PeekBatchAsync(Int32)
    public Task<IEnumerable<BrokeredMessage>> PeekBatchAsync(int messageCount)Public Function PeekBatchAsync(messageCount As Integer) As Task(Of IEnumerable(Of BrokeredMessage))

    Parameters

    Returns

  • PeekBatchAsync(Int64, Int32)
    PeekBatchAsync(Int64, Int32)
    public Task<IEnumerable<BrokeredMessage>> PeekBatchAsync(long fromSequenceNumber, int messageCount)Public Function PeekBatchAsync(fromSequenceNumber As Long, messageCount As Integer) As Task(Of IEnumerable(Of BrokeredMessage))

    Parameters

    Returns

  • ScheduleMessageAsync(BrokeredMessage, DateTimeOffset)
    ScheduleMessageAsync(BrokeredMessage, DateTimeOffset)

    Sends a scheduled message

    public Task<long> ScheduleMessageAsync(BrokeredMessage message, DateTimeOffset scheduleEnqueueTimeUtc)Public Function ScheduleMessageAsync(message As BrokeredMessage, scheduleEnqueueTimeUtc As DateTimeOffset) As Task(Of Long)

    Parameters

    Returns

  • Send(BrokeredMessage)
    Send(BrokeredMessage)

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

    public void Send(BrokeredMessage message)Public Sub Send(message As BrokeredMessage)

    Parameters

    Exceptions

  • SendAsync(BrokeredMessage)
    SendAsync(BrokeredMessage)

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

    public Task SendAsync(BrokeredMessage message)Public Function SendAsync(message As BrokeredMessage) As Task

    Parameters

    Returns

    • The asynchronous result of the operation.

  • SendBatch(IEnumerable<BrokeredMessage>)
    SendBatch(IEnumerable(Of BrokeredMessage))

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

    public void SendBatch(IEnumerable<BrokeredMessage> messages)Public Sub SendBatch(messages As IEnumerable(Of BrokeredMessage))

    Parameters

  • SendBatchAsync(IEnumerable<BrokeredMessage>)
    SendBatchAsync(IEnumerable(Of BrokeredMessage))

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

    public Task SendBatchAsync(IEnumerable<BrokeredMessage> messages)Public Function SendBatchAsync(messages As IEnumerable(Of BrokeredMessage)) As Task

    Parameters

    Returns

    • The asynchronous result of the operation.

Details

Assembly

Microsoft.ServiceBus.dll