Saturday, September 12, 2015

Configuring RabbitMQ With WSO2 ESB 4.8.1 PART 2

Installing RabbitMQ AMQP Transport to WSO2 ESB 4.8.1


The RabbitMQ AMQP Transport is developed as a separate module from axis2 default transports. So we have to install this transport as a feature to the ESB in order to deal with RabbitMQ.

To install RabbitMQ Transport as a feature follow the steps below.

  1. In Management Console click Configure ->Features ->add repository
  2. Provide any name for repository name and give following URL to Location URL  http://product-dist.wso2.com/p2/extras/releases/4.2.0/rabbitmq-axis2-transport/
  3. Click add button to add repository.
  4. After adding the repository tick on the show only the latest versions (untick Group features by category) and click on Find Features button
  5. You will see Axis2 Transport RabbitMQ AMQP listed under available features and add a tick to checkbox and install the feature
  6. Go through the installation wizard until getting the Installation complete message
  7. Restart the server to take effect
  8. Diagram 1 : add RabbitMQ repositor








Diagram 2: install Axis2 Transport RabbitMQ AMQP


Configuring RabbitMQ Transport 

Open axis2.xml (located in ESB_HOME/repository/conf/axis2/axis2.xml) and add the following RabbitMQ listener under the listener section.
 <transportReceiver name="rabbitmq" class="org.apache.axis2.transport.rabbitmq.RabbitMQListener">  
   <parameter name="AMQPConnectionFactory" locked="false">  
    <parameter name="rabbitmq.server.host.name" locked="false">192.168.0.3</parameter>  
    <parameter name="rabbitmq.server.port" locked="false">5672</parameter>  
    <parameter name="rabbitmq.server.user.name" locked="false">user</parameter>  
    <parameter name="rabbitmq.server.password" locked="false">password</parameter>  
   </parameter>  
 </transportReceiver>  
In the Transport Sender section, add the following RabbitMQ sender
 <transportSender name="rabbitmq" class="org.apache.axis2.transport.rabbitmq.RabbitMQSender"/>  
Restart the Server to take effect above configurations. 
So we have finished the configuring ESB to communicate with RabbitMQ message broker, from next part we will see on configuring message provider proxy service and consumer proxy service.






No comments :

Post a Comment