-
1. Re: JBoss ESB flows output connectivity?
scottdawson Jan 6, 2011 10:10 AM (in response to seb.wytt)Regarding the JMS half of your question... I use the JMSRouter (org.jboss.soa.esb.actions.routing.JMSRouter) to send messages to queues or topics. You can specify JMS properties such as time-to-live and priority. Note that there is an unwrap property you will need to set to true if you want the unserialized message payload to go on the queue/topic. The Programmer's Guide has details.
Regards,
Scott
-
2. JBoss ESB flows output connectivity?
seb.wytt Jan 11, 2011 8:08 AM (in response to scottdawson)Hi,
Thank you for your answer...
I tried your solution, here is my code:
<action class="org.jboss.soa.esb.actions.routing.JMSRouter" name="OutputMessageToJMS-JMSRouter.routing-action">
<property name="jndiName" value="QUEUE.poc-esb-scenar2.OUT"/>
<property name="jndi-context-factory" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
<property name="jndi-URL" value="tcp://localhost:61616"/>
<property name="unwrap" value="true"/>
</action>
but got the following error:
Caused by: javax.naming.NameNotFoundException: QUEUE.poc-esb-scenar2.OUT
at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:225)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.jboss.soa.esb.actions.routing.JMSRouter.createQueueSetup(JMSRouter.java:492)
... 66 more
However, I'm sure the queue definitively exists. As proof of this, if I use it as entry provider (jms provider) as described below, it works well:
<jms-provider connection-factory="ConnectionFactory"
jndi-URL="tcp://localhost:61616"
jndi-context-factory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" name="jms-prov">
<jms-bus busid="jms.JmsMsg.in.GwChannel">
<jms-message-filter dest-name="QUEUE.poc-esb-scenar2.OUT" dest-type="QUEUE"/>
</jms-bus>
</jms-provider>
Any clue on what I'm missing in my JMSRouter?
Thank you very much,Regards,
Seb!
-
3. Re: JBoss ESB flows output connectivity?
jmiguel77 May 20, 2013 1:58 PM (in response to seb.wytt)Hi
I know this is an old post, but i am facing a similar situation
I am using a JMSRouter to send a message to a jms queue, and then a mdb to read the messages from the queue
In the mdb i get something like this, in the message payload / object:
<Envelope><Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"><wsa:To>invm://6e446576656c6f7065722424242424242424242424245661636174696f6e205265717565737420526573706f6e73652053657276696365/false?false#10000</wsa:To><jbossesb:type xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">urn:jboss/esb/epr/type/invm</jbossesb:type><jbossesb:passByValue xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb">false</jbossesb:passByValue><wsa:MessageID>25b13d75-cd96-4f8a-aaf6-d9a9f7f6f945</wsa:MessageID></Header><Context /><Body><Content><Key>cGlJZA==</Key><Value><marshalunmarshal><plugin-type>urn:xml/marshalunmarshal/plugin/serialization</plugin-type>rO0ABXNyAA5qYXZhLmxhbmcuTG9uZzuL5JDMjyPfAgABSgAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAAAAAEUg==</marshalunmarshal></Value></Content><Content><Key>cmVxdWVzdElk</Key><Value><marshalunmarshal><plugin-type>urn:xml/marshalunmarshal/plugin/serialization</plugin-type>rO0ABXNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAE</marshalunmarshal></Value></Content><Content><Key>cGlWZXJzaW9u</Key><Value><marshalunmarshal><plugin-type>urn:xml/marshalunmarshal/plugin/serialization</plugin-type>rO0ABXNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAB</marshalunmarshal></Value></Content></Body><Attachment /><Properties><Property><Key>amJvc3MuZXNiOmNhdGVnb3J5PU1lc3NhZ2VDb3VudGVyLGRlcGxveW1lbnQ9VmFjYXRpb25SZXF1ZXN0UHJveHkuZXNiLHNlcnZpY2UtY2F0ZWdvcnk9bkRldmVsb3BlcixzZXJ2aWNlLW5hbWU9VmFjYXRpb24gUmVxdWVzdCBSZXNwb25zZSBTZXJ2aWNlVGltZQ==</Key><Value>rO0ABXNyAA5qYXZhLmxhbmcuTG9uZzuL5JDMjyPfAgABSgAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAAAAYUjw==</Value></Property></Properties></Envelope>
If i set, the unwrap property to true, in my esb service, i get an error like this:
ERROR [JMSRouter] Exception while sending message [message: [ JBOSS_XML ]
header: [ To: InVMEpr [ PortReference < <wsa:Address invm://6e446576656c6f7065722424242424242424242424245661636174696f6e205265717565737420526573706f6e73652053657276696365/false?false#10000/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/invm/>, <wsa:ReferenceProperties jbossesb:passByValue : false/> > ] MessageID: 8fa42ffa-3e30-4ba4-922e-8c91d5a18589 ]
context: {}
body: [ objects: {piId=1117, requestId=5, piVersion=1} ]
fault: [ ]
attachments: [ Named:{}, Unnamed:[] ]
properties: [ {jboss.esb:category=MessageCounter,deployment=VacationRequestProxy.esb,service-category=nDeveloper,service-name=Vacation Request Response ServiceTime=493099} ]] to destination [queue/VacationRequestResponseQueue].
Did you find a way to solve this ?? how can i read the message in the mdb ?? or how do i deserialize the soap envelope from the payload ??
JM