Seems since spring-amqp version 1.5, there is a new annotation @queuebinding。But how to use it, i don't know if it can be used on a class or a method? Does it exist any example?
Asked
Active
Viewed 1.3k times
1 Answers
16
Not sure what problem you have, but here is a sample exactly from the Reference Manual:
@Component
public class MyService {
@RabbitListener(bindings = @QueueBinding(
value = @Queue(value = "myQueue", durable = "true"),
exchange = @Exchange(value = "auto.exch"),
key = "orderRoutingKey")
)
public void processOrder(String data) {
...
}
And yes, it can be use as on class level as well as on method level.

Artem Bilan
- 113,505
- 11
- 91
- 118
-
I am seeking help on a similar concept, but not sure If i am allowed to post my question here? @Artem Bilan, based on your response may I ask a question – Riidonesh Aug 28 '20 at 06:46
-
Just raise a new SO thread and we will try to help you – Artem Bilan Aug 28 '20 at 12:12
-
Thanks @Artem Bilan, this is the link to my actual thread so I just expanded on my question, https://stackoverflow.com/questions/63484183/can-my-selenium-framework-consume-an-incoming-message – Riidonesh Aug 28 '20 at 19:16