RabbitMQ Priority Queues not working in MULE -


i'm trying use priority queues mechanism provided rabbitmq within mule esb.

i have created queue x-max-priority = 3 , in new mule proyect, i've set 3 amqp:connectors, 1 each priority, this:

<amqp:connector      name="amqplocalhostconnector0"     host="${amqp.host}"     port="${amqp.port}"     fallbackaddresses="${amqp.fallbackaddresses}"     virtualhost="${amqp.virtualhost}"     username="${amqp.username}"     password="${amqp.password}"     priority="0"     ackmode="amqp_auto"     prefetchcount="${amqp.prefetchcount}" />  /* values within ${} taken properties file.  * priorities are: "0", "1", "2" */ 

then, there simple flow sends messages every second queue containing priority string in body, besides property priority used in connector.

<flow name="rabbitmqflow1" doc:name="rabbitmqflow1">      <poll frequency="1000" doc:name="poll">         <set-payload value="priority 1" doc:name="set payload"/>     </poll>      <amqp:outbound-endpoint          exchangename="amq.direct"         routingkey="priority"         connector-ref="amqplocalhostconnector0">     </amqp:outbound-endpoint>  </flow> 

i manually repeat proccess alternating priority used each message batch. way, queue has several messages different priorities mixed.

now, if manually dequeue messages using message(s) button in management ui, delivered according priority: first priority 2, priority 1 , priority 0.

the problem is when try messages using amqp:inbound-endpoint component in mule. here simple flow gets messages priority queue , shows what's content of each one.

<flow name="rabbitmqflow2" doc:name="rabbitmqflow2">      <amqp:inbound-endpoint          queuename="priority"/>      <byte-array-to-string-transformer doc:name="byte array string"/>      <logger message="#[payload]" level="info" doc:name="logger"/>  </flow> 

here messages obtained in order sended queue , not according priorities.

what can read messages queue respecting priorities?


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -