You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/sqs.adoc
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,11 @@ public void queueListener(Person person) {
134
134
----
135
135
136
136
In this example a queue listener container is started that polls the SQS `queueName` passed to the `MessageMapping`
137
-
annotation. The incoming messages are converted to the target type and then the annotated method `queueListener` is invoked.
137
+
annotation. The incoming messages are converted to the target type and then the annotated method `queueListener` is invoked. There are multiple options to specify the queue that should be listened to:
138
+
139
+
* Using the queue name. Works only for queues within the same account and region your application/sqs client is using.
140
+
* Using the queue url. This allows access to a queue that is in a different region than your application/sqs client is using.
141
+
* Using the queue arn. Can be used to listen to queues that are owned by another account, but live within the same region your application/sqs client uses.
138
142
139
143
In addition to the payload, headers can be injected in the listener methods with the `@Header` or `@Headers`
140
144
annotations. `@Header` is used to inject a specific header value while `@Headers` injects a `Map<String, String>`
Copy file name to clipboardExpand all lines: spring-cloud-aws-messaging/src/main/java/io/awspring/cloud/messaging/support/destination/DynamicQueueUrlDestinationResolver.java
Copy file name to clipboardExpand all lines: spring-cloud-aws-messaging/src/test/java/io/awspring/cloud/messaging/support/destination/DynamicQueueUrlDestinationResolverTest.java
0 commit comments