These are implemented.
for demonstration of them working.
Thanks for the response, the Scheduled Delivery Test came in useful. However, i am still having problems setting the DLQ and RedeliveryDelay.
From the examples you pointed me too, seem to work but this is by setting these values via the code. When i try to create a queue in the destinations-service.xml, they dont seem to work.
Is there something else i should be setting somewhere in a config file to use these values or somewhere in the code to enable these to be used.
Just to fill you in on what i am doing, is that i have an MDB reading messages off a queue, if an exception is thrown i am leaving the JBoss container to deal with the rollback, i am not specifically stating rollback as i do not need to use an XA transaction.
Tim, i think this thread is related: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031979#4031979
Some of the attributes are ommitted and a JIRA case(JBOSSMESSAGING-938) has been raised. I am not sure of the status of the JIRA case though.
Madu- that task is not related to dlq or redelivery delay/
Still a bit confused by all this, sorry new to JBoss, had a look at that thread you pointed me at tim and it seems to be related to an older version, the standard-boss.xml file doesnt exist in my config.
Forgetting about DLQ for a minute, setting the redeliverydelay, by using MDB's is that affecting its usage. You stated in the thread you pointed me at about switching off something so JBM will take precedence will i need to do that to get the RedeliveryDelay working.
Sorry if i am annoying the hell out of you, just trying to get my head round this as we are one of the first in our area to use the new JBM :os
Still having massive problems with this, this is an integral part of our solution which we need to implement. Do you have any other ideas about what we could try, or give us a small list of steps we need to do in order for the JBoss RedeliveryDelay to be picked up using an MDB.
In our ejb we have the transaction type set to container.
Tim in one of your previous posts you stated : -
The MDB container / JCA layer also has its own DLQ - this is configured (normally) in standard-jboss.xml.
This will take precedence over the jboss messaging DLQ - you would need to turn this off, or maybe you want to use it.
How do we turn the MDB's default values off, as i said before i dont have a standard-jboss.xml file.
Should also add we are using JBoss 4.0.4 GA with JBM 1.2.0sp1
Hope you can help, i really need it!
The issue with redelivery delay and DLQ is as follows is related to the fact that the JBoss MDB container is situated between the JMS provider and the onMesssage of the MDB.
If you imagine, a message is received from the JMS provider (JBoss Messaging), then it gets sent to the MDB container, which does stuff like starting transactions if necessary, then it eventually gets sent to the onMessage method of the MDB.
The MDB container is not a part of JBoss Messaging, its a part of the app server and managed as a separate project.
So.. if an exception is thrown by the MDB, the exception is caught by the MDB container since that is the thing that immediately wraps the MDB, which then decides whether to redelivery, or sent the message to the DLQ etc.
As you can see from the above, this is handled further down the call stack from JBoss Messaging, so JBM does not have a chance to catch the exception and perform its own redelivery, sent to the JBM DLQ etc.
The MDB container can be configured with its own DLQ, max delivery attempts etc (see http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMDB), but currently does not contain functionality for redelivery delay.
So, when using JBM as the JMS provider for MDBs, the JBM redelivery delay attribute will effectively have no effect.
Weston Price (who is the lead for JBoss JCA which handles the MDB container) considered adding this functionality to the MDB container but so far it does not exist.
Hope that helps.
Just to clarify the above email.
If you *do not* wish to use the MDB container DLQ (this is the one configured here http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMDB and has nothing to do with JBM), and would rather use the JBM DLQ and benefit from the ability to specify different DLQs per queue with different values of MaxDeliveryAttempts, then you can comment out the DLQ section from http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMDB, to give something like:
<invoker-proxy-binding> <name>message-driven-bean</name> <invoker-mbean>default</invoker-mbean> <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory> <proxy-factory-config> <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI> <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI> <CreateJBossMQDestination>true</CreateJBossMQDestination> <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed --> <MinimumSize>1</MinimumSize> <MaximumSize>15</MaximumSize> <KeepAliveMillis>30000</KeepAliveMillis> <MaxMessages>1</MaxMessages> <MDBConfig> <ReconnectIntervalSec>10</ReconnectIntervalSec> <!-- This is commented out - JBM dlq will be used instead <DLQConfig> <DestinationQueue>queue/DLQ</DestinationQueue> <MaxTimesRedelivered>10</MaxTimesRedelivered> <TimeToLive>0</TimeToLive> </DLQConfig> --> </MDBConfig> </proxy-factory-config> </invoker-proxy-binding>
Note that this will allow you to use the JBM DLQ, ExpiryQueue and MaxDeliveryAttempts values, but it *will not* allow you to use the JBM redelivery delay, since redelivery is implemented by the MDB container as explained in the previous post.
There's not really much we can do about other than change the MDB container to implement redelivery delay.
JBM Redelivery delay will only have an effect when *not* using MDBs