@azure/service-bus_7.0.0-preview.8
Pre-release7.0.0-preview.8 (2020-11-04)
New features:
- A helper method
parseServiceBusConnectionString
has been added which validates and parses a given connection string for Azure Service Bus. You can use this to extract the namespace and entitypath details from the connection string.
PR 11949 - All methods that take an array as input are updated to ensure they gracefully do a no-op rather than throw errors. For example:
receiveDeferredMessages()
,scheduleMessages()
andcancelScheduledMessages()
. - Tracing, using @azure/core-tracing, has been added for sending and receiving of messages.
PR 11651
and
PR 11810 - Internal improvement - For the operations depending on
$management
link such as peek or lock renewals, the listeners for the "sender_error" and "receiver_error" events were added to the link for each new request made before the link is initialized which would have resulted in too many listeners and a warning such asMaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 sender_error listeners added to [Sender]. Use emittr.setMaxListeners() to increase limit
(same forreceiver_error
). This has been improved such that the listeners are reused.
PR 11738
Breaking changes
-
The
processError
passed toReceiver.subscribe
now receives aProcessErrorArgs
instead of just an error. This parameter provides additional context that can make it simpler to distinguish
errors that were thrown from your callback (via theerrorSource
member ofProcessErrorArgs
) as well as giving you some information about the entity that generated the error.
PR 11927 -
The methods to complete, abandon, defer and deadletter a message along with the method to renew message lock have been moved from the message to the receiver. With this, we now have additional validation to ensure that a peeked message cannot be used with these methods.
-
Method and interface renames based on user studies and internal reviews:
- The word "Message" is added to all methods and interfaces related to creating and sending a batch of messages for clarity based on user studies:
- The
createBatch
method on the sender is renamed tocreateMessageBatch
. - The interface
CreateBatchOptions
followed by the options that are passed to thecreateBatch
method is renamed toCreateMessageBatchOptions
. - The
tryAdd
method on the message batch object is renamed totryAddMessage
.
- The
- Renames to
ServiceBusMessage
andCorrelationRuleFilter
fields to better align with the AMQP spec:- "properties" renamed to "applicationProperties".
- "label" renamed to "subject".
- The interface
CreateReceiverOptions
followed by options that are passed toServiceBusClient.createReceiver
method is renamed toServiceBusReceiverOptions
. - The interface
AcceptSessionOptions
followed by options that are passed toServiceBusClient
acceptSession
andacceptNextSession
methods is renamed toServiceBusSessionReceiverOptions
. - The property
maxAutoRenewLockDurationInMs
of interfaceServiceBusSessionReceiverOptions
is renamed tomaxAutoLockRenewalDurationInMs
to be consistent with a similar option for renewing messages. - The property
subQueue
in the options passed to thecreateReceiver()
method is renamed tosubQueueType
to reflect that the value is restricted and not meant to contain any queue names. The corresponding typeSubQueue
is removed in favor of inlining the string literals that represent valid values.
- The word "Message" is added to all methods and interfaces related to creating and sending a batch of messages for clarity based on user studies:
-
SqlRuleFilter
interface "sqlExpression" changed from optional to required. -
ServiceBusSender.scheduleMessages
method signature updated:scheduledEnqueueTimeUtc
andmessages
parameters are swapped as the messages are the primary object that is being worked with. -
NamespaceProperties
interface property "messageSku" type changed from "string" to string literal type "Basic" | "Premium" | "Standard" to reflect the limited types it supports. -
NamespaceProperties
interface property "namespaceType" has been removed as it does not provide any value. -
Interfaces corresponding to the returned responses from the methods under the
ServiceBusAdministrationClient
such asNamespacePropertiesResponse
,QueueResponse
,TopicRuntimePropertiesResponse
have been removed in favor of using generic typeWithResponse<T>
for a cleaner API surface.
PR 10491 -
Updated the
update{Entity}
methods underServiceBusAdministrationClient
with relevant param names and types, more docs.
PR 12013 -
The raw responses(
_response
) in the returned objects from any of the methods under theServiceBusAdministrationClient
have been updated to return only the{request, status, headers}
, properties such asparsedHeaders
,parsedBody
have been removed.
PR 12015 -
viaPartitionKey
property of interfaceServiceMessageBus
has been removed until we implement the Transactions feature of Service Bus. -
Removed
AmqpAnnotatedMessage
,AmqpMessageHeaders
,AmqpMessageProperties
interfaces in favour of the ones from@azure/core-amqp
. This is part of the move from@azure/core-amqp
version update from 1.1.x to 2.0.0-beta.y. As part of this,userId
will not be made available as part ofAmqpMessageProperties
until its type is fixed in the upstreamrhea
library.
PR 12091