Reputation: 93
@RabbitListener(bindings = @QueueBinding(value = @Queue(value = "${queue}",
durable = "true", autoDelete = "false",
exchange = @Exchange(value = "${exchange}"),
key = "${binding}"),concurrency = "${concurrency}")
This creates a queue, how do I go about creating a priority queue?
Upvotes: 1
Views: 1072
Reputation: 93
So I found that the existing queues should be deleted and the exchanges as well. And the following code creates a priority queue. I looked for this online, but couldn't find any answers. So, I am posting this here.
@RabbitListener(bindings = @QueueBinding(value = @Queue(value = "${queue}",
durable = "true", autoDelete = "false",
arguments = {@Argument(name = "x-max-priority", value = "10",
type = "java.lang.Integer")}),
exchange = @Exchange(value = "${exchange}"),
key = "${binding}"),concurrency = "${concurrency}")
Upvotes: 4