Add Azure Queue Storage support with type-safe operations and blob audit logging#161
Add Azure Queue Storage support with type-safe operations and blob audit logging#161
Conversation
…alidation, and blob logging
- Create type-safe queue message infrastructure with generic envelopes
- Implement BaseQueueSender with automatic validation and blob logging
- Implement BaseQueueReceiver with message processing and blob logging
- Add MessageLogger for automatic audit trail to blob storage
- Add SchemaValidator with AJV for runtime type validation
- Add OpenTelemetry tracing integration
- Include comprehensive README and usage examples
- Add unit tests for schema validator
- Update pnpm workspace catalog with Azure SDK versions
Blob logging structure:
- Outbound: queue-messages/outbound/{timestamp}.json
- Inbound: queue-messages/inbound/{timestamp}.json
- Metadata/tags: queue name, direction, message ID, custom tags
Supports:
- Type-safe generic payloads
- Correlation IDs for distributed tracing
- Custom metadata per message
- Configurable blob logging per queue
- Local development with Azurite emulator
Part of: Azure Queue Storage support implementation
See: QUEUE_STORAGE_IMPLEMENTATION_SUMMARY.md for full implementation plan
- Create ServiceQueueStorage infrastructure service - Implement CommunityCreatedQueueSender for outbound events - Implement MemberQueueReceiver for inbound updates - Define payload schemas with JSON Schema validation - Add lifecycle management (startUp/shutDown) - Add unit tests - Include comprehensive README with examples Part of: Azure Queue Storage support (Phase 2 complete)
- Add StorageQueueFunctionOptions and StorageQueueHandler imports - Add registerAzureFunctionQueueHandler method to AzureFunctionHandlerRegistry - Update PendingHandler to support both HTTP and queue handlers - Update setupLifecycle to register queue handlers with app.storageQueue - Add comprehensive JSDoc documentation Part of: Azure Queue Storage support (Phase 3 complete)
- Register ServiceQueueStorage in Cellix infrastructure - Create community-created--send-queue-message event handler - Update RegisterEventHandlers to accept optional queue service - Send CommunityCreatedEvent to queue with full payload - Add error handling to prevent queue failures from breaking events Part of: Azure Queue Storage support (Phase 4 complete)
- Create memberQueueHandlerCreator for processing queue messages - Add updateMember application service method - Register member queue handler with Cellix - Configure queue trigger with AZURE_STORAGE_CONNECTION_STRING - Implement message processing with automatic deletion Part of: Azure Queue Storage support (Phase 5 complete)
…ntation - Create AZURE_QUEUE_LOCAL_DEVELOPMENT.md with Azurite setup guide - Create AZURE_QUEUE_IMPLEMENTATION_COMPLETE.md with completion summary - Update QUEUE_STORAGE_IMPLEMENTATION_SUMMARY.md with all phase details - Document acceptance criteria status - Add usage examples and architecture diagrams Part of: Azure Queue Storage support (Phase 6 complete - ALL PHASES DONE)
|
@copilot Why am i seeing this warning when doing pnpm install, I have using vite 7.3.1 everywhere enforced by my pnpm workspace catalog. " WARN Issues with peer dependencies found |
This warning is not related to the Azure Queue Storage changes. It's a pre-existing dependency issue where Storybook 9.1.17 has a transitive dependency on Vite 8.0.0-beta.3, which conflicts with the catalog version (7.3.1). The issue comes from Storybook's internal dependencies. Storybook 9.1.17 is pulling in the beta version of Vite 8, while This is a known compatibility issue with Storybook 9.x and can be safely ignored - it's just a peer dependency warning and won't affect functionality. The packages will work despite the warning. To resolve it (optional), you could either:
|
Implements first-class Azure Queue Storage infrastructure for distributed service communication with automatic blob audit trails, JSON schema validation, and OpenTelemetry tracing.
Core Infrastructure
@cellix/queue-storage-seedwork- Framework seedwork packageBaseQueueSender<TPayload>/BaseQueueReceiver<TPayload>with generic payload typing and runtime schema validationMessageLogger- Fire-and-forget blob writes toqueue-messages/{inbound|outbound}/{ISO8601-timestamp}.jsonanytypes - strict generics with discriminated unions@ocom/service-queue-storage- Application serviceCommunityCreatedPayloadandMemberUpdatePayloadCellix API Extension
Added
registerAzureFunctionQueueHandler()to fluent startup API:Proof-of-Concept Integrations
Outbound:
CommunityCreatedEventdomain event sends typed payload tocommunity-createdqueue with automatic blob loggingInbound:
memberqueue trigger receives messages, validates schema, updates member records via application service, deletes processed messagesLocal Development
Azurite emulator support documented in
AZURE_QUEUE_LOCAL_DEVELOPMENT.mdwith connection string configuration and testing examples.Original prompt
This section details on the original issue you should resolve
<issue_title>Implement Azure Queue Storage support in Cellix with type-safe, logged queue sender/receiver and proof-of-concept</issue_title>
<issue_description>## Overview
The Cellix framework must provide robust, first-class support for Azure Queue Storage, enabling reusable queuing and logging for distributed communications between services. This work introduces foundational packages and application integration—including legacy-based queue sender/receiver abstractions, application-configurable service registration, and functional business examples.
Built-in Logging to Blob Storage
queue-messages:queue-messages/outbound/queue-messages/inbound/2026-02-07T14:42:03.123Z.jsonImplementation expectations (legacy parity + improvements)
@cellix/queue-storage-seedworkmust enforce proper type safety using generic typings and runtime guarantees:anyfor generic queue message/payload plumbing.unknown+ validation + typed narrowing where needed.Deliverables & Structure
1)
@cellix/queue-storage-seedworkCreate a new framework seedwork package containing reusable queue storage infrastructure code:
queue-messages, withinbound/andoutbound/).2)
@ocom/service-queue-storageCreate an Owner Community application-specific package that:
@cellix/queue-storage-seedwork.3) Extend Cellix fluent startup API to support queue triggers
In
@ocom/api(and/or Cellix core where appropriate), expose a fluent, chained startup API to register Azure Functions queue handlers similarly to how HTTP handlers are registered today.Proof-of-concept scenarios (MUST be implemented in Owner Community)
These examples are required to prove the design works with what is already functional in the repo and to provide contributors a working reference.
Outbound queue example:
community-createdCommunityCreatedEvent(already firing in the domain) must send a queue message to the outbound queuecommunity-created.communityId,name,createdAt, etc.).queue-messages/outbound/with configured tags/metadataInbound queue example:
membermemberthat accepts a payload:memberId: string(required; objectId)💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.