Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 15, 2025

Overview

This PR completes the implementation of the Intent.Modules.Aws.Sqs module by following the specifications in IMPLEMENTATION_PLAN.md. The module provides AWS SQS eventing infrastructure for Intent Architect applications with fully metadata-driven configuration.

What Was Implemented

1. Shared Project Infrastructure (Intent.Modules.Integration.IaC.Shared.AwsSqs)

Created a shared project that provides the metadata aggregation layer used by the main module:

  • IntegrationManager.cs - Singleton class that scans all applications in a solution for AWS SQS module usage, aggregates published and subscribed messages from metadata, and provides queryable collections for template generation
  • SqsMessage.cs - Concrete implementation that wraps message models with queue name resolution (from stereotype or convention-based kebab-case naming)
  • SqsItemBase.cs - Abstract base record defining common properties for SQS items
  • SqsMethodType.cs - Simple enum for Publish/Subscribe operations

2. API Extensions

  • MessageModelStereotypeExtensions.cs - Provides the AWS SQS stereotype that can be applied to message models in the Eventing designer, with properties for QueueName and QueueUrl (optional)

3. Factory Extensions

  • MetadataLoaderExtension.cs - Factory extension that initializes the IntegrationManager after metadata load, making aggregated message metadata available to all templates

4. Metadata-Driven Configuration

Updated the SqsConfiguration template to use IntegrationManager for fully automated configuration:

  • Publisher Options: Automatically generates AddQueue<TMessage>() calls for each published message
  • Handler Registration: Automatically registers all event handlers in the DI container
  • Subscription Options: Automatically generates Add<TMessage, THandler>() calls for each subscription

Result: Zero manual configuration required - everything is derived from Intent Architect models.

Key Features

Convention Over Configuration

  • Default queue names use kebab-case conversion (e.g., ClientCreatedEventclient-created)
  • Stereotype allows customization when needed
  • Configuration keys follow AwsSqs:{MessageName}:QueueUrl pattern

Simpler Architecture Than Azure Service Bus

  • No topics/subscriptions (SQS only has queues)
  • Simpler stereotype model (just queue name)
  • 4 shared project files vs 7 for Azure
  • No channel type enum needed

Integration Pattern

Follows the same core + bridge architecture as Azure Service Bus:

  • Core Module (this PR): Provides IEventBus, ISqsMessageDispatcher, and DI configuration
  • Bridge Module (future): Will provide Lambda function generation

Files Changed

Created (6 new files):

  • Shared project: IntegrationManager.cs, SqsMessage.cs, SqsItemBase.cs, SqsMethodType.cs
  • Main module: Api/MessageModelStereotypeExtensions.cs, FactoryExtensions/MetadataLoaderExtension.cs

Modified (5 files):

  • Intent.Modules.Integration.IaC.Shared.AwsSqs.projitems - Added file references
  • Intent.Modules.Aws.Sqs.csproj - Imported shared project
  • Intent.Aws.Sqs.imodspec - Registered factory extension
  • Templates/SqsConfiguration/SqsConfigurationTemplatePartial.cs - Implemented metadata-driven approach
  • README.md - Added metadata support documentation

Build Status

✅ Builds successfully (0 errors, 21 nullable reference warnings)
✅ Module packages successfully (39KB .imod file generated)
✅ All templates compile without errors
✅ Ready for integration testing

Usage Example

With this implementation, developers can:

  1. Create message models in the Eventing designer
  2. Optionally apply AWS SQS stereotype to customize queue names
  3. Create Integration Event Handlers for subscriptions in Services designer
  4. Run Software Factory
  5. Get generated code with complete SQS infrastructure - no manual configuration needed

The generated SqsConfiguration.ConfigureSqs() method includes all publisher options, subscription options, and handler registrations automatically derived from the Intent Architect models.

Original prompt

Follow the IMPLEMENTATION_PLAN.md in the AWS SQS module project.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits October 15, 2025 21:58
…ented

Co-authored-by: dandrejvv <7236289+dandrejvv@users.noreply.github.com>
…es IntegrationManager

Co-authored-by: dandrejvv <7236289+dandrejvv@users.noreply.github.com>
Co-authored-by: dandrejvv <7236289+dandrejvv@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement AWS SQS module as per plan Implement AWS SQS module with metadata-driven configuration following IMPLEMENTATION_PLAN.md Oct 15, 2025
Copilot AI requested a review from dandrejvv October 15, 2025 22:05
@dandrejvv dandrejvv marked this pull request as ready for review October 21, 2025 14:13
@dandrejvv dandrejvv merged commit 127c75f into feature/sqs Oct 21, 2025
1 check passed
@dandrejvv dandrejvv deleted the copilot/implement-aws-sqs-module branch October 21, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants