Monday, November 2, 2015

Integrate WSO2 ESB as a message consumer from WSO2 MB using SSL


WSO2 ESB can be used to consume / produce messages to WSO2 MB via different ways. Using proxies, MS/MP & inbound endpoints. This post will be on how to use the ESB as a message consumer from WSO2 MB via SSL connection.

Step 1 Download the products

For this I am using WSO2 ESB 4.9.0 which can be found from here. WSO2 MB RC1 which can be found from here.

Step 2 Configure SSL in WSO2 MB and WSO2 ESB

WSO2 MB
To configure a new keystore and configure it in WSO2 MB refer my previous blog post from here. Also remember to set a port offset as 1 for WSO2 MB.


WSO2 ESB
In ESB side since we are using inbound endpoint it is very limited areas that we need to change.


  1. Copy the client libraries from WSO2 MB which is located at {WSO2_MB_HOME}/client-libs to {WSO2_ESB_HOME}repository/components/lib
  2. Configure the jndi.properties file as follows. The jndi file can be found at {WSO2_ESB_HOME}repository/conf
          Create the queue connection factory as shown below

connectionfactory.QueueConnectionFactorySSL = amqp://admin:admin@carbon/carbon?brokerlist='tcp://localhost:8673?ssl='true'&ssl_cert_alias='RootCA'&trust_store='{PATH TO TRUST STORE}/client-truststore.jks'&trust_store_password='wso2carbon'&key_store='{PATH TO KEY STORE/mykeystore.jks'&key_store_password='mypkpasswordd''


Step 3 Creating a SSL enabled inbound endpoint in ESB

Now that we configure WSO2 MB and ESB lets create the queue and connect via SSL to MB. Navigate to WSO2 ESB console and click on inbound endpoint section. From there give a name and select JMS. Refer the below pic to complete the fields. Remember to point to the jndi file and also give the connection factory and the initial connection factory.




Step 4 Testing the connection

Ones the above inbound endpoint is created a queue will be created in WSO2 MB with an active subscription. 


You can verify whether SSL is working correctly by changing the jndi connection with a false password. Then an exception will be thrown.


1 comment:

  1. Lucky Club Casino Site - Lucky Club Online Casino Review
    Lucky Club Casino is owned by Evolution Gaming, a large part of the Evolution 카지노사이트luckclub Gaming family. As part of their recent integration into their casino

    ReplyDelete