-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/master' into beginn…
…er-guide-to-creating-apache-http-client # Conflicts: # build-all.sh
- Loading branch information
Showing
46 changed files
with
2,841 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
target | ||
.project | ||
.settings | ||
.DS_Store |
Binary file not shown.
2 changes: 2 additions & 0 deletions
2
aws/spring-cloud-sns-sqs-pubsub/.mvn/wrapper/maven-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Publisher-Subscriber Pattern using AWS SNS and SQS in Spring Boot | ||
|
||
Codebase demonstrating the implementation of publisher-subscriber pattern using AWS SNS and SQS in Spring Boot. [Spring Cloud AWS](https://spring.io/projects/spring-cloud-aws) is used to interact with AWS services in context. | ||
|
||
[LocalStack](https://github.com/localstack/localstack) has been used to containerize the multi-module Maven project for local development. The below commands can be used to start the applications: | ||
|
||
```bash | ||
./mvnw clean package spring-boot:build-image | ||
``` | ||
```bash | ||
sudo docker-compose up -d | ||
``` | ||
|
||
## Blog posts | ||
|
||
Blog posts about this topic: | ||
|
||
* [Publisher-Subscriber Pattern using AWS SNS and SQS in Spring Boot](https://reflectoring.io/publisher-subscriber-pattern-using-aws-sns-and-sqs-in-spring-boot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: '3.7' | ||
|
||
services: | ||
localstack: | ||
container_name: localstack | ||
image: localstack/localstack:3.3 | ||
ports: | ||
- 4566:4566 | ||
environment: | ||
- SERVICES=sns,sqs | ||
volumes: | ||
- ./localstack/init-sns-topic.sh:/etc/localstack/init/ready.d/init-sns-topic.sh | ||
- ./localstack/init-sqs-queue.sh:/etc/localstack/init/ready.d/init-sqs-queue.sh | ||
- ./localstack/subscribe-sqs-to-sns.sh:/etc/localstack/init/ready.d/subscribe-sqs-to-sns.sh | ||
networks: | ||
- reflectoring | ||
|
||
user-management-service: | ||
container_name: user-management-service | ||
image: aws-pubsub-user-management-service | ||
ports: | ||
- 8080:8080 | ||
depends_on: | ||
- localstack | ||
environment: | ||
spring.cloud.aws.sns.endpoint: 'http://localstack:4566' | ||
spring.cloud.aws.credentials.access-key: test | ||
spring.cloud.aws.credentials.secret-key: test | ||
spring.cloud.aws.sns.region: 'us-east-1' | ||
io.reflectoring.aws.sns.topic-arn: 'arn:aws:sns:us-east-1:000000000000:user-account-created' | ||
networks: | ||
- reflectoring | ||
|
||
notification-dispatcher-service: | ||
container_name: notification-dispatcher-service | ||
image: aws-pubsub-notification-dispatcher-service | ||
ports: | ||
- 9090:8080 | ||
depends_on: | ||
- localstack | ||
- user-management-service | ||
environment: | ||
spring.cloud.aws.sqs.endpoint: 'http://localstack:4566' | ||
spring.cloud.aws.credentials.access-key: test | ||
spring.cloud.aws.credentials.secret-key: test | ||
spring.cloud.aws.sqs.region: 'us-east-1' | ||
io.reflectoring.aws.sqs.queue-url: 'http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/dispatch-email-notification' | ||
networks: | ||
- reflectoring | ||
|
||
networks: | ||
reflectoring: |
33 changes: 33 additions & 0 deletions
33
aws/spring-cloud-sns-sqs-pubsub/integration-test/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
HELP.md | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ |
Binary file added
BIN
+61.1 KB
aws/spring-cloud-sns-sqs-pubsub/integration-test/.mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions
2
aws/spring-cloud-sns-sqs-pubsub/integration-test/.mvn/wrapper/maven-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar |
Oops, something went wrong.