simple vm in mule

Post on 20-Jan-2017

91 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Simple VM Transport in Mule

What is a VM transport in Mule?

• The VM or Virtual Machine transport is used for communication between Mule flows. Uses in memory queues and can be configured to used persistent queues too.

• xmlns:vm=“http://www.mulesoft.org/schema/mule/vm” , the xml namespace used

• http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd , the xml schema location for this project.

• Note: I used 3.8 mule runtime on this example

• Based from the previous slide, I created an vm queue named “vm.one”, it will accept any transactions that will call the vm endpoint “vm.one”

• Basically, transaction type i used on this example is just the default.

• request-response, using request-response endpoints, messages are delivered directly from an outbound vm endpoint to the inbound vm endpoint that is listening on the same path. This delivery is blocking and occurs in the same thread. If there is no inbound request-response VM endpoint in the same Mule application that is listening on this path, then dispatching a message from the outbound endpoint fails.

• one-way, when using one-way endpoints, messages are delivered to the corresponding inbound endpoint via a queue. This delivery is non-blocking. If there is no inbound one-way endpoint in the same Mule application listening on this path, then, although dispatching of the message succeeds, the message remains in the queue. By default, this queue is in memory, but it is also possible to configure a persistent queue that uses the file system as its persistence mechanism.

• Added an HTTP inbound listener to try to conduct a transaction going to “vm.one” queue.

• The final mule configuration with simple call to “vm.one” queue via http inbound.

References:

• https://docs.mulesoft.com/mule-user-guide/v/3.6/vm-transport-reference

END

top related