@azure/service-bus package
Classes
MessagingError |
Describes the base class for Messaging Error. |
ServiceBusAdministrationClient |
All operations return promises that resolve to an object that has the relevant output.
These objects also have a property called |
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 |
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
Example usage:
|
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 |
Delivery | |
GetMessageIteratorOptions |
Options when getting an iterable iterator from Service Bus. |
HttpHeader |
An individual header within a HttpHeaders collection. |
HttpHeadersLike |
A collection of HTTP header key/value pairs. |
HttpResponse |
The properties on an HTTP response which will always be present. |
MessageHandlers |
The general message handler interface (used for streamMessages). |
NamespaceProperties |
Represents the metadata related to a service bus namespace. |
OperationOptions |
The base options type for all operations. |
PeekMessagesOptions |
Describes the options passed to the |
ProcessErrorArgs |
Arguments to the |
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. |
RetryOptions |
Retry policy options that determine the mode, number of retries, retry interval etc. |
RuleProperties |
Represents all the attributes of a rule. |
ServiceBusAdministrationClientOptions |
Represents the client options of the |
ServiceBusClientOptions |
Describes the options that can be provided while creating the ServiceBusClient.
|
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. |
ServiceBusRuleManager |
Allows rules for a subscription to be managed. This rule manager requires only Listen claims, whereas the ServiceBusAdministrationClient requires Manage claims. |
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 |
ServiceBusSenderOptions |
Options to use when creating a sender. |
ServiceBusSessionReceiver |
A receiver that handles sessions, including renewing the session lock. |
ServiceBusSessionReceiverOptions |
Describes the options passed to the |
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 |
TokenCredential |
Represents a credential capable of providing an authentication token. |
TopicProperties |
Represents the input for updateTopic. |
TopicRuntimeProperties |
Represents runtime info attributes of a topic entity |
TryAddOptions |
The set of options to manually propagate |
WebResourceLike |
A description of a HTTP request to be made to a remote server. |
WebSocketImpl |
Describes the required shape of WebSocket constructors. |
WebSocketOptions |
Options to configure the channelling of the AMQP connection over Web Sockets. |
Type Aliases
EntitiesResponse |
Represents the result of list operation on entities which also contains the |
EntityAvailabilityStatus |
Possible values for |
EntityStatus |
Possible values for |
OperationOptionsBase |
NOTE: This type is intended to mirror the relevant fields and structure from Options for configuring tracing and the abortSignal. |
RawHttpHeaders |
A HttpHeaders collection represented as a simple JSON object. |
ServiceBusErrorCode |
Service Bus failure codes. |
SqlRuleAction |
Represents all possible fields on SqlRuleAction |
TransferProgressEvent |
Fired in response to upload or download progress. |
WithResponse |
Represents the returned response of the operation along with the raw response. |
Enums
RetryMode |
Describes the Retry Mode type |
TokenType |
Describes the type of supported tokens. |
Functions
delay<T>(number, Abort |
A wrapper for setTimeout that resolves a promise after t milliseconds. |
is |
Determines if an error is of type |
parse |
Parses given connection string into the different properties applicable to Azure Service Bus. The properties are useful to then construct a ServiceBusClient. |
Function Details
delay<T>(number, AbortSignalLike, string, T)
A wrapper for setTimeout that resolves a promise after t milliseconds.
function delay<T>(delayInMs: number, abortSignal?: AbortSignalLike, abortErrorMsg?: string, value?: T): Promise<T | void>
Parameters
- delayInMs
-
number
The number of milliseconds to be delayed.
- abortSignal
- AbortSignalLike
The abortSignal associated with containing operation.
- abortErrorMsg
-
string
The abort error message associated with containing operation.
- value
-
T
The value to be resolved with after a timeout of t milliseconds.
Returns
Promise<T | void>
- Resolved promise
isServiceBusError(unknown)
Determines if an error is of type ServiceBusError
function isServiceBusError(err: unknown): err
Parameters
- err
-
unknown
An error to check to see if it's of type ServiceBusError
Returns
err
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): ServiceBusConnectionStringProperties
Parameters
- connectionString
-
string
The connection string associated with the Shared Access Policy created for the Service Bus namespace, queue or topic.