[
https://wso2.org/jira/browse/ESBJAVA-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18772#action_18772
]
Lucas Moten commented on ESBJAVA-462:
-------------------------------------
Although the message context property JMS_MESSAGE_ID is indeed being set with
the message.getJMSMessageID, the updates to message context don't appear to be
available if no reply message is expected from JMS (as demonstrated in
pipelined request/response samples 250-252 using this model:
client->ESB->JMS->Axis2Server respond in return)
I have a requirement to accept a SOAP based webservice containing a message,
and put it on a JMS queue, where it will remain for an unknown period of time.
In return, the message id should be made available, which may be checked
independently to determine the status of the original request being processed.
From the queue onward, further validation occurs, the message is transformed,
and delivered to another system. In short, a one-way send of message (model:
client->ESB->JMS set property)
In the above scenario, the ESB, not receiving any message from JMS, never has
anything to return by default and times out the request. Furthermore, without
a response of some sort, there is no way to establish guaranteed delivery of
the message to the JMS. The following proxy configuration demonstrates an
attempt to compensate for this by using a fault sequence to prepare a more
meaningful request, but in this case, the JMS_MESSAGE_ID property that does get
sent in JMSSender, is not available in the message context for reporting
because its not setting the out context.
<proxy name="rproxy" transports="http">
<target>
<endpoint>
<address
uri="jms:/testQueue?transport.jms.ConnectionFactory=myQueueConnectionFactory">
<timeout><duration>10</duration><action>fault</action></timeout>
</address>
</endpoint>
<faultSequence><script language="groovy">
<![CDATA[
def jmsMsgId = String.valueOf(mc.getProperty("JMS_MESSAGE_ID"));
def propertyKeys = mc.getPropertyKeySet();
def properties = "";
def payloadXML = "";
propertyKeys.each { properties += "<$it>" +
String.valueOf(mc.getProperty(it)) + "</$it>"; }
payloadXML += "<response>";
payloadXML += "<status>Message received for processing and given the
following id: " + jmsMsgId + "</status>";
payloadXML += "<properties>" + properties + "</properties>";
payloadXML += "</response>";
mc.setPayloadXML(payloadXML);
mc.setResponse(true);
]]>
</script>
<header name="To" action="remove"/>
<send />
</faultSequence>
</target>
</proxy>
Ideally, it would be preferable to not even rely upon a faultSequence, but
rather return a message context that could allow for manipulation in an
outSequence.
See Also: http://wso2.org/forum/thread/3936
> Return the ID of the Message in a queue
> ---------------------------------------
>
> Key: ESBJAVA-462
> URL: https://wso2.org/jira/browse/ESBJAVA-462
> Project: WSO2 ESB
> Issue Type: New Feature
> Affects Versions: NIGHTLY
> Environment: Software platform
> Reporter: Jonatan Guillen
> Assignee: Asankha Perera
> Fix For: 1.7
>
>
> Make a change, when sending a message to a queue return the ID of the
> message.
> It may be necessary to look at the position of the message in the queue
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-dev