[esb-java-user] ESB with ActiveMQ
j0na
jonatan.guillen at safelayer.com
Mon May 5 03:32:22 PDT 2008
Hi all!
I'm trying to make asynchronous communication. When a user sends a message,
the ESB puts the message in a queue (ActiveMQ) and responds to the user with
the ID of the message in the queue.
I am using this Synapse configuration:
<?xml version="1.0" encoding="UTF-8"?>
<syn:definitions xmlns:syn="http://ws.apache.org/ns/synapse">
<syn:registry provider="org.wso2.esb.registry.ESBRegistry">
<syn:parameter name="cachableDuration">15000</syn:parameter>
<syn:parameter name="root">file:registry/</syn:parameter>
</syn:registry>
<syn:proxy name="StockQuoteProxy" transports="vfs" startOnLoad="true"
statistics="enable" trace="enable">
<syn:target>
<syn:endpoint>
<syn:address
uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue"/>
</syn:endpoint>
<syn:outSequence>
<syn:send>
<syn:endpoint>
<syn:address
uri="vfs:ftp://admin:admin@localhost/OUT?vfs.passive=true"/>
</syn:endpoint>
</syn:send>
</syn:outSequence>
</syn:target>
<syn:publishWSDL
uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
<syn:parameter name="transport.PollInterval">15</syn:parameter>
<syn:parameter
name="transport.vfs.FileURI">vfs:ftp://admin:admin@localhost/IN?vfs.passive=true</syn:parameter>
<syn:parameter
name="transport.vfs.FileNamePattern">.*\.xml</syn:parameter>
<syn:parameter
name="transport.vfs.ContentType">text/xml</syn:parameter>
</syn:proxy>
<syn:sequence name="fault">
<syn:log level="full">
<syn:property name="MESSAGE" value="Executing default
"fault" sequence"/>
<syn:property name="ERROR_CODE"
expression="get-property('ERROR_CODE')"/>
<syn:property name="ERROR_MESSAGE"
expression="get-property('ERROR_MESSAGE')"/>
</syn:log>
<syn:drop/>
</syn:sequence>
<syn:sequence name="main">
<syn:log/>
<syn:drop/>
</syn:sequence>
</syn:definitions>
The ESB is left waiting for a response from ActiveMQ.
1 - How I get the ID of the message in response?
2 - If I want to see the message once has the ID, I'll have to make a
mediator for it?
--
View this message in context: http://www.nabble.com/ESB-with-ActiveMQ-tp17057598p17057598.html
Sent from the WSO2 ESB Users mailing list archive at Nabble.com.
More information about the Esb-java-user
mailing list