This section describes how WSO2 ESB can be used to send messages to a RabbitMQ queue.
Following is a sample scenario that demonstrates how the ESB is configured to listen to HTTP requests and publish them to a RabbitMQ server (message exchange).
To create proxy services, sequences, endpoints, message stores and message processors in the ESB, you can either use the ESB Management Console or copy the XML configuration to the source view. To access the source view on the ESB Management Console, go to Manage -> Service Bus -> Source View.
- Configure the RabbitMQ AMQP transport. For information on how to configure the transport, see Configuring the RabbitMQ AMQP transport.
- Start the ESB server.
Configure the sample
Create a custom proxy service with the following configuration. For more information on creating proxy services, see Working with Proxy Services.
Use the following as a RabbitMQ consumer that will consume and display the incoming messages to the RabbitMQ queue.
Execute the sample client
Execute the following command from
<ESB_HOME>/sample/axis2Client, to send an HTTP message to ESB proxy service.
Analyzing the output
You will see that the http request is sent to the given ESB Proxy service and that it is forwarded to the RabbitMQ server via the RabbitMQ AMQP transport sender.
You can view the messages received at the RabbitMQ queue in the RabbitMQ SimpleProducer console.