Created
September 27, 2016 06:57
-
-
Save mateuszmrozewski/d6cf6fca0b11502529c23beb43420e0a to your computer and use it in GitHub Desktop.
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
@Bean | |
public List<Declarable> queueDeclarations() | |
{ | |
boolean durable = true; | |
boolean autoDelete = false; | |
boolean exclusive = false; | |
Map<String, Object> args = new HashMap<>(); | |
args.put("x-dead-letter-exchange", "dl.exchange"); | |
args.put("x-dead-letter-queue", "dl.queue"); | |
return Arrays.asList( | |
new FanoutExchange("dl.exchange", durable, autoDelete), | |
new DirectExchange("my.exchange", durable, autoDelete), | |
new Queue("my.queue", durable, exclusive, autoDelete, args), | |
new Queue("dl.queue", durable), | |
new Binding("dl.queue", Binding.DestinationType.QUEUE, "dl.exchange", "dl.queue", null), | |
new Binding("my.queue", Binding.DestinationType.QUEUE, "my.exchange", "my.queue", null) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment