0
votes

I am using mulesoft ESB with Anypoint studio for a project. In one of my flows I am using one-way message exchange pattern to dispatch from VM (default-persistent-queue-store VM connector) to JMS, both xa transaction enabled to avoid losing messages. I also make sure to use one JMS consumer, so that order of messages is preserved (i.e. consumed by JMS in the original order).

1) Does "default-persistent-queue-store" config. store messages in some sort of hash/dictionary? The problem is when the connection to ActiveMQ (JMS provider) resets, the messages stored at VM queue don't get dispatched in the original order. Is this expected?

2) Is there a way to customize "default-persistent-queue-store" config. on VM connector to achieve order of messages if connection to ActiveMQ resets?

3) Is there any other alternative way of accomplishing the same?

4) I could not find an example of how to specify "FilePersistenceStrategy" on VM connector, could someone please show me an example of it being used somewhere? It's mentioned on http://www.mulesoft.org/documentation/display/current/VM+Transport+Reference

1

1 Answers

0
votes

1) By default it will use an in memory hashmap. If I'm not wrong order will be lost.

2) No, but you can pass others

<vm:connector name="myConnector">
   <vm:queue-profile maxOutstandingMessages="500" >
     <file-queue-store/>
   </vm:queue-profile>
</vm:connector>

3) If you use request-response, the hashmap might not be necessary. Also you could consider a flow-ref rather than a vm endpoint.

4) See 2.