《日子》.activemq 队列消息优先级排序

A common requirement is to support priority consumption; so high priority messages are consumed before low priority.
In version 5.4 priority queues are supported. Both the message cursors and the message stores (KahaDB and JDBC) support message priority. The support is disabled by default so it needs to be be enabled using per destination policies through xml configuration, in the example below, 'prioritizedMessages' is enabled for all queues.





...

java code:

producer.setPriority(5);

你可能感兴趣的:(《日子》.activemq 队列消息优先级排序)