[Messaging, JMS & JBossMQ] - MaxDeliveryAttempts and RedeliveryDelay being ignored?
by daniel.gaiottino
The following is on JBoss5-beta4.
I'm currently working on a project where we send Objects to a purgatory queue if none of out services are available. The idea is that the messages will be kept here until the a suitable service is deployed again that can handle the message.
Setting MaxDeliveryAttempts set to 10 and RedeliveryDelay set to 5000 for the queue "queue/jboss/purgatory" I expected the following:
- ServiceManager notices there are no Services available and puts the object on the purgatory queue.
- PurgatoryMDB picks up the message immediately and throws and Exception or does a Rollback to requeue the message for 5 seconds.
- After 5 seconds PurgatoryMDB picks up the message again, checks with ServiceManager has a Service available now and if so passes it back to the ServiceManager. If not it is requeued again for 10 times before being sent to the DLQ.
The queue config is
<mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=purgatory"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation>
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="JNDIName">queue/jboss/purgatory</attribute>
| <attribute name="MaxDeliveryAttempts">10</attribute>
| <attribute name="RedeliveryDelay">5000</attribute>
| </mbean>
If I throw an EJBException from in the MDB to trigger the requeueing I see if being requeued and picked up immediately 5 times before it is sent to the DLQ.
If I have
@Resource
| private MessageDrivenContext context; and do context.setRollbackOnly(); it is again requeued and picked up immediately and never gets put on the DLQ.
The PurgatoryMDB is configured with
@MessageDriven(activationConfig = {
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/jboss/purgatory") })
|
What do I need to do to make JBoss5 use the attributes I have set in the queue configuration?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162066#4162066
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162066
17 years, 9 months
[Installation, Configuration & DEPLOYMENT] - Multiple Jboss Proccesses
by idweiss
Can it be that a JBoss instance will launch other JBoss instances?
We observed JBoss duplicate processes on our system running JBoss 4.2.0.GA on Sun T5220 machines with Solaris 10.
After we run JBoss for several hours we sometime see several JBoss processes running instead of only one, although we launch only one JBoss instance (we made sure by adding logging to the JBoss run.sh launch script). Also the new duplicate JBoss processes have the parent pid of the original JBoss process (the original JBoss process has a parent pid of it's run.sh process). The JBoss processes have the same parameters as the original JBoss process and take the same amount of memory.
Here's an example of running the ps -ef | grep run.sh command:
anauser 16082 1 0 12:45:50 ? 0:00 /bin/sh /export/home/ana41/jboss/bin/run.sh -b 0.0.0.0
anauser 16093 16082 2 12:45:50 ? 960:40 /export/home/ana41/java/bin/java -Dprogram.name=run.sh -server -Xms2048m -Xmx20
anauser 5623 16093 0 00:48:39 ? 0:00 /export/home/ana41/java/bin/java -Dprogram.name=run.sh -server -Xms2048m -Xmx20
anauser 5627 16093 0 00:48:43 ? 0:00 /export/home/ana41/java/bin/java -Dprogram.name=run.sh -server -Xms2048m -Xmx20
anauser 5590 16093 0 00:48:31 ? 0:00 /export/home/ana41/java/bin/java -Dprogram.name=run.sh -server -Xms2048m -Xmx20
We also see that the Total Running time of these duplicate processes are almost always 0. We saw only once a duplicate JBoss process with a running time of 2, and then that process disappeared. I have a theory that maybe these Processes are stuck because their output stream are not read or directed to anywhere. We still have no idea what launched these processes.
Will appreciate any advise.
Thanks,
Ido
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162048#4162048
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162048
17 years, 9 months