I don't think there is a delay parameter
(I could be wrong), but you can configure
a Dead Letter Queue where messages go
when they are redelivered too many times.
Look in docs/dtd/jboss_3_0.dtd
for container-invoker-conf and MDBConfig/DLQConfig
I have developed a simple delay interceptor for the message driven bean container configuration ( have a look at configuration "Standard Message Driven Bean" in standardjboss.xml in the JBoss conf-directory, ).
On interceptor chain invocation for the onMessage()call it simply checks if the message is marked as redelivered ( Message.getJMSRedelivered() ).
If so, than it simply puts the executing thread to sleep for a certain time periode, effectivly delaying the message redelivery . As the executing thread belongs to the MDB-specific message driven bean container thread pool, this blocking has no negativ impact on the overall application server processing.
I need to do pretty much the same - any chance of you posting your delay interceptor code (either here or directly to me at email@example.com) as there is precious little documentation available on writing ones own interceptor.
In particular from browsing the interceptor source the code path to get from a 'receive(...)' entry point to getting hold of an actual message reference looks rather tortuous so it would be really helpful to me to see your code. I'm wondering whether I'm actually looking at the right interceptors as I've been looking at generic JMS interceptors that are nothing to do with MDB's.
Thanks in advance.
Here is the source for my simple JMS redelivery delay interceptor as an eclipse project. Build the jar file, deploy it to <your-jboss-config>/lib and modify the 'Standard Message Driven Bean' container configuration in <your-jboss-config>/conf/ standardjboss.xml to include the new interceptor into the interceptor chain for the standard jboss MDB container.
<container-name>Standard Message Driven Bean</container-name>
<!-- CMT -->