Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

JMS supports two models for messaging as follows: 

...

Now you have a JMS topic in the broker server and a subscriber service in the ESB. To complete the scenario, you need to configure a topic publisher.

Configuring WSO2 ESB as a publisher publisher 

To create another proxy service as a topic publisher, add the following proxy service configuration to the ESB.

Code Block
languagehtml/xml
<proxy xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy" transports="http" statistics="disable" trace="disable" startOnLoad="true">
  <target>
     <inSequence>
        <property name="OUT_ONLY" value="true"/>
     </inSequence>
     <outSequence>
        <send/>
     </outSequence>
     <endpoint>
        <address uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory&java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&java.naming.provider.url=repository/conf/jndi.properties&transport.jms.DestinationType=topic"/>
     </endpoint>
  </target>
  <description></description>
</proxy>

 

Info
titleNote

If you are using the source view in the management console, replace the '&' character of the above JMS endpoint URL with '&amp;'  

Invoking the publisher  publisher  

To invoke the publisher, simply use the StockQuoteClient service that comes with the ESB by default. Go to <ESB_HOME>/samples/axis2Client and run the following command: 

...