JMS retries issue

Discussions

General J2EE: JMS retries issue

  1. JMS retries issue (3 messages)

    Description of the setup:
    - Running JBOSS 3.2.x.
    - Have a persisted queue and messages are posted to it successfully.
    - MDB reads messages from queue.

    Issue: most of the time, the MDB cannot do it's backend calls simply because the BE is not ready to be updated yet (It will be but it is unknown when it will be, ie. after 40 seconds). Don't ask me about what a 'brilliant' backend system we are talking to; just leave the issue... I already *know* it sux.

    We can use message retries to have the server retry again until the call succeeds. When we do this however: as soon as the message is 'back' on the queue another MDB is ready to process the message. The server is then very busy retrying all the time whereas it would be much more efficient if a retry would be performed e.g. after 20 seconds; also preventing the unnecessary resources usage.

    Is this possible in JBOSS?
    I know other middleware vendors have something like message expiry and control (eg. BEA 8.1) but this is not available in JBOSS afaik. Maybe anyone has the same issue or solved this issue?

    Any help would be appreciated.

    Threaded Messages (3)

  2. JMS retries issue[ Go to top ]

    I've experienced similar problems with JBossMQ on JBoss 3.2.X. I haven't found a clean way to address the problem yet, but I have a couple of workarounds.

    The first, more simpler workaround, is to let the MDB's current thread sleep before it rolls back the message. I also disable JBoss's dead letter queue (DLQ) so I won't lose the message to the DLQ after multiple rollbacks.

    The second way is by having the MDB rollback by writing to another queue. You can then set up a cron task to periodically copy any messages from that queue to the queue your MDB listens on.

    Both ways aren't that good, but that's what we're doing until I'm enlightened about a better way.
  3. How to make "MDB's current thread sleep "? Pls show some light The first, more simpler workaround, is to let the MDB's current thread sleep before it rolls back the message. I also disable JBoss's dead letter queue (DLQ) so I won't lose the message to the DLQ after multiple rollbacks.
  4. Re: JMS retries issue[ Go to top ]

    How to make "MDB's current thread sleep "? Pls show some light The first, more simpler workaround, is to let the MDB's current thread sleep before it rolls back the message. I also disable JBoss's dead letter queue (DLQ) so I won't lose the message to the DLQ after multiple rollbacks.