Consuming messages from a queue

Now, we will learn how to consume messages from a queue. A common way to consume these queues is using a proxy that is attached to the queue. This proxy monitors the queue, consuming every message that is received in the queue:

In order to achieve this, we have to enable the transport receiver so that the proxy will be able to connect to the JMS Queue, where messages await to be consumed. We will proceed in the same way as we did for the transport sender in the previous section, but in this case, we have to enable the transport receiver:

  1. Open the axis2.xml file.
  2. Look for the following string in this file:

Get WSO2 Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.