Skip to content

3.1.0

Latest

Choose a tag to compare

@jasonshave jasonshave released this 16 Oct 21:47
428f394

3.1 is a big step on from 3.0: the processor gains batch handlers, lambda handlers, middleware, routing and an error policy; the poison queue can be inspected and replayed; telemetry covers lag, saturation, cost and hung handlers; and two new packages add Blob storage for messages over 64 KiB and ASP.NET Core health checks. See the README for everything below.

Packages: AzureStorage.QueueService, and new: AzureStorage.QueueService.Blobs, AzureStorage.QueueService.HealthChecks.

Breaking changes from 3.0

3.0 shipped days earlier with little uptake, so changes originally planned for 4.0 were made now. Each needs a one-line fix; details in the README's "Upgrading from 3.0 to 3.1".

  • SendAsync returns SendResult, and GetPropertiesAsync returns QueueStatus, instead of the Azure SDK's SendReceipt / QueueProperties.
  • RenewLockAsync is now RenewVisibilityAsync.
  • QueueClientSettingsBuilder is now QueueServiceBuilder.
  • The default serializer writes camelCase JSON and reads either case. Pass your own JsonSerializerOptions to keep PascalCase.

Behaviour changes

  • Poison messages no longer expire after 7 days (PoisonTimeToLive to set one), and each records why it was dead-lettered.
  • One receive loop per processor, taking only as many messages as it has free handlers.
  • Quieter logs: healthy messages at Debug; handler failures are warnings until the last attempt.
  • Arguments the service would reject (timeouts, a message over 64 KiB) throw before any call is made.

New

  • Processing: batch handlers (AddBatchProcessor), lambda handlers, middleware, routing several message types on one queue (and a CloudEvent router), an error policy (DeadLetterOn<T>(), OnHandlerError), pause/resume and status (IQueueProcessorController), a rate limiter, MaxRenewalDuration, a long-running-handler warning, QueueName / Headers / IsLastAttempt on each message, processor options from configuration.
  • Sending: headers, Delay, gzip compression.
  • Poison queue: IDeadLetterQueue to peek and replay (optionally filtered).
  • Setup: UseStorageAccount(...) so clients only name their queue; account endpoint plus QueueName; clear errors for unregistered clients.
  • Own loops: ReadAllAsync.
  • Telemetry: time in queue, receive requests by result, active handlers, oldest handler age, renewals, dead-letters by reason, opt-in queue and poison depth gauges, span events, a log scope per delivery, and opt-in OpenTelemetry-standard metric names.
  • Trimming and native AOT: annotated and analyzer-clean; doc comments ship in the package.
  • Message format: a versioned envelope with forward-compatibility rules, so a future version's messages are dead-lettered intact rather than misread.

Issue #51; pull requests #50, #52, #53.