[
https://issues.jboss.org/browse/JBESB-3611?page=com.atlassian.jira.plugin...
]
Michael Burman commented on JBESB-3611:
---------------------------------------
This one is difficult to show with testcase (would require deployment of whole AS+ESB).
Here's the issue I'm trying to fix:
1. Message is sent to QueueA.
2. Message is read from QueueA and delivered to a Service.
3. While processing we encounter a RuntimeException, say database is down
4. JCA-layer rolls back the message to QueueA, since it encountered RuntimeException.
Repeat these 3 steps 5 times and after that the JBoss Messaging / HornetQ will deliver the
message to DLQ. JBossESB has a feature (in jbossesb.esb package) that reads messages from
the DLQ and then redelivers them to the original queue.
Implementation of the DLQ process in JBossESB:
1. Read message from the DLQ
2. Store it as a serialized object to the database (message table) with classification
DLQ
Every 5 minutes (default):
1. List all messages from the database (message table) with the classification RDLVR
2. Deserialize the object, and read property DELIVER_TO: Service to = (Service)
message.getProperties().getProperty(ServiceInvoker.DELIVER_TO);
3. ServiceInvoker.deliverAsync(to).
However, that "DELIVER_TO" is never set to the message, so the redeliver fails
always. In it's current set, it's only used if JCA transactions are not used and
the ESB's internal DLQ process is used.
As for breaking things, I don't agree. The DELIVER_TO property is never accessed from
JBossESB's internal methods in the rosetta/src tree. It's only set in the
ServiceInvoker. The only place it's read is in the services/jbossesb/src where the
RDLVR process is. So adding DELIVER_TO would only add some more metadata into the existing
messages, but no system should read it. It would however enable the usage of DLQ/RDLVR
process to all users, not just those not using the JCA-layer.
ServiceInvoker would always set DELIVER_TO property
---------------------------------------------------
Key: JBESB-3611
URL:
https://issues.jboss.org/browse/JBESB-3611
Project: JBoss ESB
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: Transports
Affects Versions: 4.9 CP1
Reporter: Michael Burman
Attachments: serviceinvoker_jbesb_3611.patch
If ServiceInvoker fails when sending a msg to destination queue, it sets DELIVER_TO
messageProperty before sending it to DeadLetterService. With this functionality the
jbossesb.esb package can send DLQ messages from the database back to the destination
JMS-Queue. However, this functionality does not work when used with JCA and the
JMS-servers' own DLQ-functionality, since there is no DELIVER_TO parameter set.
The attached patch would always set the DELIVER_TO property to the messages and would
make the ESB's DLQ-handler work with transacted JCA-queues also. It should not break
any existing functionality, as this value is only read by DBMessageStoreImpl,
redeliver(URI uuid) part.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira