[
https://jira.jboss.org/jira/browse/JBMESSAGING-1738?page=com.atlassian.ji...
]
Howard Gao commented on JBMESSAGING-1738:
-----------------------------------------
Here is what has happened:
if you didn't specify the property
@ActivationConfigProperty(propertyName = "DLQMaxResent", propertyValue =
"10")
JCA's AbstractDLQHandler controls message delivery count. Its default max delivery
limit is 5. But JBM's default max delivery limit is 10.
So when the re-delivery count is greater than 5 the AbstractDLQHandler intercepts it and
sends the message to DLQ. Somehow the JCA's implementation ignores the DLQ settings in
the configuratio and uses the default DLQ.
if the property is given, JCA's AbstractDLQHandler changes the limit to 10, while in
JBM the max delivery limit is also 10. At the 10th re-delivery, JBM intercepts the max
delivery reaching event and sends the message to the correct DLQ. Changing the value to be
greater than 10 doesn't change the result.
The above facts reveals the following problems:
1. JCA ignores the DLQ attribute specified in the queue's configuration file.
2. JCA doesn't correctly handle the max redelivery limit. If the limit is set to n, it
doesn't send the message to DLQ until n+1 th redelivery.
3. JCA doesn't correctly handle its relation with JBM's max re-delivery control.
Problems will show if you specify the DLQMaxResent count to be greater than JBM's
default (10), in which case JBM will send the message to DLQ always at 10th re-delivery,
giving JCA no chance to control.
None of the problems should be handled at JBM side. I'm going to create a related JIRA
for JCA.
Howard
Inconsistent DLQ behavior with MDB
----------------------------------
Key: JBMESSAGING-1738
URL:
https://jira.jboss.org/jira/browse/JBMESSAGING-1738
Project: JBoss Messaging
Issue Type: Bug
Affects Versions: 1.4.0.SP3.CP08
Reporter: Justin Bertram
Assignee: Howard Gao
Fix For: 1.4.0.SP3.CP10, 1.4.7.GA
Attachments: ejb3mdb.zip
I have a simple MDB that receives a message from "queue/A", logs a message, and
calls context.setRollBackOnly() to force redelivery. I have modified "queue/A"
to use "queue/PrivateDLQ" via:
<attribute
name="DLQ">jboss.messaging.destination:service=Queue,name=PrivateDLQ</attribute>
When I send a message to "queue/A" this appears in the log:
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
WARN [AbstractDLQHandler] Message redelivered=6 max=5 sending it to the dlq
delegator->JBossMessage[5135007189598208]:NON-PERSISTENT, deliveryId=0
However, the message doesn't go to "queue/PrivateDLQ". It goes to
"queue/DLQ" instead.
When I modify the MDB to use @ActivationConfigProperty(propertyName =
"DLQMaxResent", propertyValue = "10") and send a message to
"queue/A" I get this in the log:
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
INFO [ExampleEJB3MDB] Got a message from "queue/A"
Notice that there is no message from
org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler. However, this is present at
DEBUG:
DEBUG [org.jboss.jms.client.container.ClientConsumer]
JBossMessage[5135008224608258]:NON-PERSISTENT has reached maximum delivery number 10,
cancelling to server
DEBUG [org.jboss.jms.server.endpoint.ServerSessionEndpoint] Sending message:
Reference[5135008224608258]:NON-RELIABLE to dlq Queue[23251066/0/8-PrivateDLQ]
The message is rightfully sent to "queue/PrivateDLQ."
It appears that in the first (i.e. default) situation the JCA layer was taking care of
delivery to DLQ, but in the second situation JBoss Messaging was performing delivery to
DLQ. It seems to me the behavior should be consistent.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira