Search code examples
springrabbitmqamqpspring-amqpspring-rabbit

Spring AMQP - how to set arguments on a Queue?


I'm try to set arguments on a queue, however Spring's Queue class doesn't have a setter method for arguments.

http://docs.spring.io/spring-amqp/api/org/springframework/amqp/core/Queue.html

Any ideas? Thanks.


Solution

  • Oh dear! You just missed ctor for that: http://docs.spring.io/spring-amqp/api/org/springframework/amqp/core/Queue.html#Queue-java.lang.String-boolean-boolean-boolean-java.util.Map-

    As you see that class is immutable and you can provide properties only through the ctors.