@azure/service-bus package

Classes

ServiceBusAdministrationClient

All operations return promises that resolve to an object that has the relevant output. These objects also have a property called _response that you can use if you want to access the direct response from the service.

ServiceBusClient

A client that can create Sender instances for sending messages to queues and topics as well as Receiver instances to receive messages from queues and subscriptions.

ServiceBusError

Errors that occur within Service Bus.

Interfaces

AuthorizationRule

Represents type of AuthorizationRule in ATOM based management operations.

CorrelationRuleFilter

Represents the correlation filter expression. A CorrelationRuleFilter holds a set of conditions that are matched against user and system properties of incoming messages from a Subscription.

CreateMessageBatchOptions

Options to configure the createBatch method on the Sender.

  • maxSizeInBytes: The upper limit for the size of batch. Example usage:
{
    maxSizeInBytes: 1024 * 1024 // 1 MB
}
CreateQueueOptions

Represents settable options on a queue

CreateSubscriptionOptions

Represents settable options on a subscription

CreateTopicOptions

Represents settable options on a topic

DeadLetterOptions

Describes the reason and error description for dead lettering a message using the deadLetter() method on the message received from Service Bus.

GetMessageIteratorOptions

Options when getting an iterable iterator from Service Bus.

MessageHandlers

The general message handler interface (used for streamMessages).

NamespaceProperties

Represents the metadata related to a service bus namespace.

PeekMessagesOptions

Describes the options passed to the peekMessages method on a receiver.

ProcessErrorArgs

Arguments to the processError callback.

QueueProperties

Represents the input for updateQueue.

QueueRuntimeProperties

Represents runtime info attributes of a queue entity

ReceiveMessagesOptions

Options when receiving a batch of messages from Service Bus.

RuleProperties

Represents all the attributes of a rule.

ServiceBusClientOptions

Describes the options that can be provided while creating the ServiceBusClient.

  • webSocketOptions : Options to configure the channelling of the AMQP connection over Web Sockets.
    • websocket : The WebSocket constructor used to create an AMQP connection if you choose to make the connection over a WebSocket.
    • webSocketConstructorOptions : Options to pass to the Websocket constructor when you choose to make the connection over a WebSocket.
  • retryOptions : The retry options for all the operations on the client.
    • maxRetries : The number of times the operation can be retried in case of a retryable error.
    • maxRetryDelayInMs: The maximum delay between retries. Applicable only when performing exponential retries.
    • mode: Which retry mode to apply, specified by the RetryMode enum. Options are Exponential and Fixed. Defaults to Fixed.
    • retryDelayInMs: Amount of time to wait in milliseconds before making the next attempt. When mode is set to Exponential, this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.
    • timeoutInMs: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any retry attempts remaining. Minimum value: 60000 milliseconds.
ServiceBusConnectionStringProperties

The set of properties that comprise a Service Bus connection string.

ServiceBusMessage

Describes the message to be sent to Service Bus.

ServiceBusMessageBatch

A batch of messages that you can create using the <xref:createBatch> method.

ServiceBusReceivedMessage

Describes the message received from Service Bus during peek operations and so cannot be settled.

ServiceBusReceiver

A receiver that does not handle sessions.

ServiceBusReceiverOptions

Options to use when creating a receiver.

ServiceBusSender

A Sender can be used to send messages, schedule messages to be sent at a later time and cancel such scheduled messages. Use the createSender function on the ServiceBusClient to instantiate a Sender. The Sender class is an abstraction over the underlying AMQP sender link.

ServiceBusSessionReceiver

A receiver that handles sessions, including renewing the session lock.

ServiceBusSessionReceiverOptions

Describes the options passed to the acceptSession and acceptNextSession methods when using a Queue/Subscription that has sessions enabled.

SqlRuleFilter

Represents all possible fields on SqlRuleFilter

SubscribeOptions

Options used when subscribing to a Service Bus queue or subscription.

SubscriptionProperties

Represents the input for updateSubscription.

SubscriptionRuntimeProperties

Represents runtime info attributes of a subscription entity

TopicProperties

Represents the input for updateTopic.

TopicRuntimeProperties

Represents runtime info attributes of a topic entity

TryAddOptions

The set of options to manually propagate Span context for distributed tracing.

Type Aliases

EntitiesResponse

Represents the result of list operation on entities which also contains the continuationToken to start iterating over from.

EntityAvailabilityStatus

Possible values for availabilityStatus of the Service Bus messaging entities.

EntityStatus

Possible values for status of the Service Bus messaging entities.

OperationOptionsBase

NOTE: This type is intended to mirror the relevant fields and structure from @azure/core-http OperationOptions Options for configuring tracing and the abortSignal.

ServiceBusErrorCode

Service Bus failure codes.

SqlRuleAction

Represents all possible fields on SqlRuleAction

WithResponse

Represents the returned response of the operation along with the raw response.

Functions

isServiceBusError(unknown)

Determines if an error is of type ServiceBusError

parseServiceBusConnectionString(string)

Parses given connection string into the different properties applicable to Azure Service Bus. The properties are useful to then construct a ServiceBusClient.

Function Details

isServiceBusError(unknown)

Determines if an error is of type ServiceBusError

function isServiceBusError(err: unknown)

Parameters

err

unknown

An error to check to see if it's of type ServiceBusError

Returns

boolean

parseServiceBusConnectionString(string)

Parses given connection string into the different properties applicable to Azure Service Bus. The properties are useful to then construct a ServiceBusClient.

function parseServiceBusConnectionString(connectionString: string)

Parameters

connectionString

string

The connection string associated with the Shared Access Policy created for the Service Bus namespace, queue or topic.

Returns