-
1. Re: Message Delay and redelivery count in jbossmq
adrian.brock Nov 15, 2002 7:50 AM (in response to kkeyan_b)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
Regards,
Adrian -
2. Re: Message Delay and redelivery count in jbossmq
schrouf Dec 20, 2002 4:10 AM (in response to kkeyan_b)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. -
3. Re: Message Delay and redelivery count in jbossmq
paulbandler Jan 14, 2003 10:35 AM (in response to kkeyan_b)I need to do pretty much the same - any chance of you posting your delay interceptor code (either here or directly to me at pbandler@nexagent.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.
Paul Bandler -
4. Re: Message Delay and redelivery count in jbossmq
schrouf Jan 15, 2003 11:18 AM (in response to kkeyan_b)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-configuration>
<container-name>Standard Message Driven Bean</container-name>
<call-logging>false</call-logging>
<container-invoker>org.jboss.ejb.plugins.jms.JMSContainerInvoker</container-invoker>
<container-interceptors>
org.jboss.ejb.plugins.LogInterceptor
de.mobilcom.eai.adapter.base.RedeliveryDelayInterceptor
org.jboss.ejb.plugins.RunAsSecurityInterceptor
<!-- CMT -->
...