Integrating MagooClient with RabbitMQ (2)

Configuring Connection to a Topic Exchange

The configuration dialog for a RabbitMQ transport listening for messages on queue com.magoosoft.#, bound to a routing key of the same name, on a magootopics topic exchange is shown below.




Publishing to a Topic Exchange

Once configured, a plain-text test message can be sent to validate correct operation. To create a message, select the New Text Message from the Message menu in the main MagooClient window. Sample message text may be entered as can a subject which will be mapped to the message correlationId property.


On the To: line enter the destination rabbitmq:magootopics/com.magoosoft.support and click on Send. The message will be published and routed by RabbitMQ to the com.magoosoft.# queue which has been bound to the routing key of the same name. The message is then picked up by the magootopics/com.magoosoft.# transport listening on the queue com.magoosoft.# and placed in the inbox.



 

To better illustrate a publish and subscribe model, create another RabbitMQ transport for the magootopics exchange but consuming from a queue bound to routing key com.magoosoft.info. Now send a message to rabbitmq:magooqueue/com.magoosoft.info and note that two messages are received. This is because the message will be routed by RabbitMQ to both the com.magoosoft.info and com.magoosoft.# queues as the routing keys match. These messages will then be picked up by the two respective transports listening on these queues and placed in the inbox.


 

Summary

As can be seen from the above example, MagooClient can be very quickly and simply deployed as a user client for RabbitMQ-based applications. The above scenario used simple plain-text messages to test connectivity - however XML messages can be sent just as easily with received messages subjected to full WSDL/Schema validation as required.


Download MagooClient now for RabbitMQ

< Previous 1 2