12
Simple VM Transport in Mule

Simple VM in Mule

Embed Size (px)

Citation preview

Page 1: Simple VM in Mule

Simple VM Transport in Mule

Page 2: Simple VM 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.

Page 3: Simple VM in Mule

• 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

Page 4: Simple VM in Mule
Page 5: Simple VM in Mule

• 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.

Page 6: Simple VM in Mule

• 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.

Page 7: Simple VM in Mule

• 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.

Page 8: Simple VM in Mule
Page 9: Simple VM in Mule

• 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.

Page 10: Simple VM in Mule
Page 11: Simple VM in Mule

References:

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

Page 12: Simple VM in Mule

END