github Azure/azure-sdk-for-js @azure/event-hubs_5.0.0-preview.2

latest releases: @azure/arm-fabric_1.0.0-beta.1, @azure/arm-computeschedule_1.0.0-beta.1, @azure/arm-avs_6.0.0...
pre-release5 years ago

General

  • The sender is refactored to avoid the warning around too may listeners being attached which would occur before if too many send requests were in flight at the same time from the same sender.
  • The receiver is refactored to allow the same underlying AMQP link to be shared between streaming and batching mode. This results in seamless transition between the three different receive methods on the EventHubConsumer
  • All time related entites have been updated to use milli seconds as the unit of time for consistency.
  • New error InsufficientCreditError is introduced for the scenario where rhea is unable to send events due to its internal buffer being full. This is a transient error and so is treated as retryable.
  • The error OperationTimeoutError was previously mistakenly classified as an AMQP error which is now corrected. Since this can also be a transient error, it is treated as retryable.

Publishing events

  • Added method createBatch() on the EventHubProducer to create an EventDataBatch that can then be used to add events until the maximum size is reached.
    • This batch object can then be used in the send() method to send all the added events to Event Hubs.
    • This allows publishers to build batches without the possibility of encountering the error around the message size exceeding the supported limit when sending events.
    • It also allows publishers with bandwidth concerns to control the size of each batch published.

Consuming events

  • Introduced a new class EventProcessor which replaces the older concept of Event Processor Host.
    • This early preview is intended to allow users to test the new design using a single instance of EventProcessor. The ability to store checkpoints to a durable store will be added in future updates

Retries and timeouts

  • The properties on the RetryOptions interface have been renamed for ease of use.
  • New property timeoutInMs on RetryOptions to configure the time to wait before declaring an attempt to have failed with OperationTimeoutError error which is retryable.
  • New properties mode and maxRetryDelayInMs on RetryOptions to configure the exponential retry mode that is now supported

Don't miss a new azure-sdk-for-js release

NewReleases is sending notifications on new releases.