Skip to content

Conversation

@lax66
Copy link

@lax66 lax66 commented Nov 25, 2025

The Orders service could not create or publish SQS messages because the AWS SDK modules for sqs and sts were missing from the pom.xml. This prevented SqsAsyncClient from initializing correctly.

Adding these dependencies restores full SQS messaging functionality.

Issue #: Fixes #705

Description of changes:
The Orders service could not create or publish SQS messages because the AWS SDK modules for sqs and sts were missing from the pom.xml. This prevented SqsAsyncClient from initializing correctly.
Adding these dependencies restores full SQS messaging functionality.

Summary
This PR fixes an issue where the Orders service cannot connect to Amazon SQS when RETAIL_ORDERS_MESSAGING_PROVIDER=sqs is used.
Fixes: #705
The root cause was missing AWS SDK dependencies in pom.xml (sqs and sts), preventing the SQS client from initializing and blocking queue resolution/creation.

Root Cause
The AWS SDK v2 requires explicit service modules. The Orders service was missing:

<dependency>
  <groupId>software.amazon.awssdk</groupId>
  <artifactId>sqs</artifactId>
</dependency>
<dependency>
  <groupId>software.amazon.awssdk</groupId>
  <artifactId>sts</artifactId>
</dependency>

Because these were not included:

  • SqsAsyncClient never initialized
  • Queue lookup failed
  • Queue attribute resolution threw runtime exceptions

Orders could not publish SQS events

What This PR Does
✔Adds required AWS SDK dependencies (sqs, sts)
✔ Restores SQS messaging support in the Orders service
✔ No application code changes
✔ No impact to RabbitMQ users
✔ Works with Docker Compose (env creds) and EKS/EC2 (IAM roles)

Testing
Validated by:

  • Adding missing dependencies
  • Rebuilding and deploying the Orders service
  • Setting:
RETAIL_ORDERS_MESSAGING_PROVIDER=sqs
RETAIL_ORDERS_MESSAGING_SQS_TOPIC=orders-events

Confirmed:

  • SQS client initializes
  • Queue resolves correctly
  • Messages publish successfully
  • Full Orders → SQS pipeline works end-to-end

Additional Notes

  • Only pom.xml was modified.
  • No configuration or code logic was changed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The Orders service could not create or publish SQS messages because the AWS
SDK modules for `sqs` and `sts` were missing from the pom.xml. This prevented
SqsAsyncClient from initializing correctly.

Adding these dependencies restores full SQS messaging functionality.
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.

Orders Services does not work with aws sqs

1 participant