Skip to content

Add Spring Integration channel adapters for SNS - #1473

Merged
maciejwalkowiak merged 2 commits into
awspring:mainfrom
artembilan:spring-integration-sns
Sep 26, 2025
Merged

Add Spring Integration channel adapters for SNS#1473
maciejwalkowiak merged 2 commits into
awspring:mainfrom
artembilan:spring-integration-sns

Conversation

@artembilan

@artembilan artembilan commented Sep 17, 2025

Copy link
Copy Markdown
Contributor
  • Add spring-integration-http as an optional dep into spring-cloud-aws-sns.
  • Add SnsInboundChannelAdapter to consume SNS notification over HTTP(S)
  • Add SnsMessageHandler to publish to an SNS topic.
  • The SnsHeaderMapper and SnsBodyBuilder are supporting classes for various SNS publish scenarios
  • The SnsRequestFailureException is a generic exception with a message a and request context to throw when publication fails
  • Add extra useful SnsHeaders constant for some Spring Integration message headers
  • Since SnsMessageHandler is based on the SnsAsyncClient, introduce an SnsAsyncTopicArnResolver for such an async use-case
  • Add spring-cloud-aws-starter-integration-sns
  • Document this new feature
  • Add missed spring-cloud-aws-starter-integration-sqs module int the root pom

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated reference documentation to reflect the change
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions github-actions Bot added component: sns SNS integration related issue type: documentation Documentation or Samples related issue type: dependency-upgrade Dependency version bump labels Sep 17, 2025

@MatejNedic MatejNedic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
@maciejwalkowiak we should think of how to add SnsAsyncClient and other asyncClient to autoconfiguration

@artembilan

Copy link
Copy Markdown
Contributor Author

Hold on with the merge, please.
I see a couple typos.
Will fix them shortly...

* Add `spring-integration-http` as an optional dep into `spring-cloud-aws-sns`.
* Add `SnsInboundChannelAdapter` to consume SNS notification over HTTP(S)
* Add `SnsMessageHandler` to publish to an SNS topic.
* The `SnsHeaderMapper` and `SnsBodyBuilder` are supporting classes for various SNS publish scenarios
* The `SnsRequestFailureException` is a generic exception with a message a and request context
to throw when publication fails
* Add extra useful `SnsHeaders` constant for some Spring Integration message headers
* Since `SnsMessageHandler` is based on the `SnsAsyncClient`, introduce an `SnsAsyncTopicArnResolver`
for such an async use-case
* Add `spring-cloud-aws-starter-integration-sns`
* Document this new feature
* Add missed `spring-cloud-aws-starter-integration-sqs` module int the root pom
* Simplify `try..catch` logic in the `SnsMessageHandler` and add missed `currentThread().interrupt()`
* Add `.fifo` logic to the `SnsAsyncTopicArnResolver`

@MatejNedic MatejNedic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @artembilan !!! LGTM

@maciejwalkowiak
maciejwalkowiak merged commit 4c2da2e into awspring:main Sep 26, 2025
5 checks passed
@maciejwalkowiak maciejwalkowiak added this to the 4.0.0 milestone Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: sns SNS integration related issue type: dependency-upgrade Dependency version bump type: documentation Documentation or Samples related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants