This section explains, through an example scenario, how the Message Broker EIP can be implemented using WSO2 ESB. The following topics are covered:
Table of Contents | ||
---|---|---|
|
...
ESB configuration
Start the ESB server and log into its management console UI (https:
//localhost:9443/carbon
). In the management console, navigate to the Main Menu, click Service Bus and then Source View menu and click Source View in the Service Bus section. Next, copy and paste the following configuration, which helps you explore the example scenario, to the source view. Anchor step10 step10
...
Simulating the sample scenario
Send a request using Stock Quote client to the proxy service in the following manner. For information on the Stock Quote client, refer to the Sample Clients section in WSO2 ESB documentation.
ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=WSO2
Note that the request is stored in WSO2 Message Broker. Any consumer can access the stored message by accessing destinationMyQueue
in WSO2 Message Broker.
How the implementation works
...
- jms:/myqueue - Looks for a JNDI entry
myqueue
(see JNDI properties above). - ? - Separator indicating extra attributes.
- transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory - Looks up
ConnectionFactory
in JNDI with nameQueueConnectionFactory
. - & - Separator (this will convert to ‘&’)
- java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory - Uses the andes properties-based JNDI.
- & - Another separator (this will convert to ‘&’)
- java.naming.provider.url=repository/conf/jndi.properties - Looks in
repository/conf/jndi.properties
for the JNDI properties file.