Skip to content

feat: Create NetEvolve.Pulse.AzureQueueStorage project with AzureQueueStorageMessageTransport #286

@samtrion

Description

@samtrion

User Story

As a developer using Azure who wants a simple Pulse Outbox transport, I want a NetEvolve.Pulse.AzureQueueStorage package, so that I can route outbox events through Azure Queue Storage as a cheaper alternative to Azure Service Bus.


Background

Azure Queue Storage is significantly cheaper than Azure Service Bus and available in every Azure Storage account. The 64 KB Base64-encoded message limit (~48 KB raw) is acceptable for most command payloads.


Requirements

  • Create src/NetEvolve.Pulse.AzureQueueStorage/NetEvolve.Pulse.AzureQueueStorage.csproj:
    et8.0;net9.0;net10.0; dependency on Azure.Storage.Queues.
  • Create AzureQueueStorageTransportOptions: ConnectionString?, QueueServiceUri?, QueueName = "pulse-outbox", MessageVisibilityTimeout?, CreateQueueIfNotExists = true.
  • Create AzureQueueStorageTransportOptionsValidator : IValidateOptions<...>: either ConnectionString or QueueServiceUri required; QueueName not empty. ValidateOnStart().
  • Create AzureQueueStorageTransportOptionsConfiguration: binds Pulse:Transports:AzureQueueStorage.
  • Create AzureQueueStorageMessageTransport : IMessageTransport:
    • QueueClient lazily initialized (Managed Identity via DefaultAzureCredential or connection string).
    • CreateQueueIfNotExists = true: calls QueueClient.CreateIfNotExistsAsync().
    • SendAsync: serializes to JSON, Base64-encodes, calls SendMessageAsync.
    • SendBatchAsync: sequential iteration.
    • Messages > 48 KB raw: throws InvalidOperationException with size limit message.
  • Two UseAzureQueueStorageTransport() overloads (connection string and Uri).

Acceptance Criteria

  • Project builds on all three target frameworks.
  • SendAsync encodes and sends correctly.
  • Oversized message throws InvalidOperationException.
  • Validator rejects missing both ConnectionString and QueueServiceUri.
  • Unit tests pass.

Metadata

Metadata

Labels

type:featureIndicates a new feature or enhancement to be added.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions