Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TopicClient

Package version

Describes the client that allows interacting with a Service Bus Topic. Use the createTopicClient function on the ServiceBusClient object to instantiate a TopicClient

Hierarchy

  • TopicClient

Implements

Index

Properties

entityPath

entityPath: string
readonly
property

The path for the Service Bus Topic for which this client is created.

id

id: string
readonly
property

A unique identifier for this client.

Methods

close

  • close(): Promise<void>

createSender

  • Creates a Sender to be used for sending messages, scheduling messages to be sent at a later time and cancelling such scheduled messages.

    If the Topic has session enabled Subscriptions, then messages sent without the sessionId property will go to the dead letter queue of such subscriptions.

    throws

    Error if the TopicClient or the underlying connection is closed.

    throws

    Error if an open sender already exists on the TopicClient.

    Returns Sender

Static getDeadLetterTopicPath

  • getDeadLetterTopicPath(topicName: string, subscriptionName: string): string
  • Returns the corresponding dead letter topic name for the given topic and subscription names. Use this in the createSubscriptionClient function of the ServiceBusClient instance to receive messages from dead letter queue for given subscription.

    Parameters

    • topicName: string

      Name of the topic whose dead letter counterpart's name is being fetched

    • subscriptionName: string

      Name of the subscription whose dead letter counterpart's name is being fetched

    Returns string

Generated using TypeDoc