- Update
amqp-common
dependency version to 1.0.0-preview.6. This includes fix for the bug 3971 where the token audience in the credential created during MSI based login was being ignored. PR 4146 - Added event handlers for
error
andprotocolError
events on the connection object to avoid the case of unhandled exceptions like bug 4136
- Added missing package.json file to the npm package to fix issues bundling with webpack and other bundlers. This fixes the bug 2857.
- Readme updated to remove the status about this library being in preview. This library is now out of preview.
receiveMessages()
now returns rejected promise when network connection is lost.- Receiving messages from a session whose id is an empty string is now allowed.
- Errors thrown explicitly by the library for the user facing apis are documented in jsdocs.
- When Service Bus does not acknowledge a message settlement/disposition request in time, the error
ServiceUnavailbleError
is thrown. This is consistent with send requests and requests over the $management link. - The error
MessageLockLostError
orSessionLockLostError
(based on whether the entity has sessions enabled or not) is thrown for a message settlement/disposition request when the AMQP receiver link that was used to receive the message has died. - User agent string which is passed as a AMQP connection property is updated to follow the new standard.
For example:
azsdk-js-azureservicebus/1.0.0/(NODE-VERSION v10.15.0) Windows_NT 10.0.17763
- Proxy support added. Please refer to the useProxy sample to see how you can use Websockets to run this library with a proxy server
- Standardized error messages on errors thrown on parameter validations
- We now have API reference docs published for this library. Checkout our README which has been updated with the relevant API reference links.
The second preview of the @azure/service-bus library has the below breaking changes from the previous version:
Some of our classes and functions have undergone a naming change to better describe what they are meant to do.
- The
Namespace
class is renamed toServiceBusClient
- The function to get a sender,
getSender
is renamed tocreateSender
. It will now throw an error if an open sender already exists on theQueueClient
/SubscriptionClient
. If a previously created sender was closed, then this will create a new sender. - The function to get a receiver,
getReceiver
is renamed tocreateReceiver
. It will now throw an error if an open receiver already exists on theQueueClient
/SubscriptionClient
. If a previously created receiver was closed, then this will create a new receiver. - The function to get a receiver for a session enabled Queue/Subsciption,
getSessionReceiver
is no longer supported. UsecreateReceiver
instead and pass thesessionOptions
parameter to providesessionId
and the duration until which you want to lock the session. receive
andreceiveBatch
functions on the reciever are renamed toregisterMessageHandler
andreceiveMessages
renewLock
on the receiver is renamed torenewMessageLock
. In case of receiver from sessions, this is renamed torenewSessionLock
.- A third way of receiving messages is introduced on the receiver via
getMessageIterator
function which returns an async iterator over messages.
- If you have been using the
createFromAadTokenCredentials
function to create an instance of theNamespace
class (which is nowServiceBusClient
), you will now need to use the @azure/ms-rest-nodeauth library instead of ms-rest-azure library to create the credentials that are needed by thecreateFromAadTokenCredentials
function. - Typescript: Replaceimport * from "ms-rest-azure";
withimport * from "@azure/ms-rest-nodeauth";
- Javascript: Replacerequire("ms-rest-azure")
withrequire("@azure/ms-rest-nodeauth")
- Fixed Bug 1611 where we could not receive
more than 2047 messages in a single receiver when in
ReceiveAndDelete
mode. - Fixed Bug 1098 where precision was lost on the messageId when a number is passed.
- A network connection lost error is now treated as retryable error. A new error with name
ConnectionLostError
is introduced for this scenario which you can see if you enable the logs. - When recovering from an error that caused the underlying AMQP connection to get disconnected, rhea reconnects all the older AMQP links on the connection resulting in the below 2 errors in the logs. We now clear rhea's internal map to avoid such reconnections. We already have code in place to create new AMQP links to resume send/receive operations. Fixes Bug 1268 - InvalidOperationError: A link to connection '.....' $cbs node has already been opened. - UnauthorizedError: Unauthorized access. 'Listen' claim(s) are required to perform this operation.
The first preview of the @azure/service-bus library has the below features
- Send messages to Queues and Topics
- Schedule to send messages at a later time to Queues and Topics
- Cancel such scheduled messages
- Peek messages from Queues and Subscriptions
- Receive messages from Queues and Subscriptions, settle them in 1 of 4 ways
complete()
abandon()
defer()
deadletter()
- Receive messages that were deferred or deadletter from Queues and Subscriptions