activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Murphy" <bmurphy1...@gmail.com>
Subject Re: ActiveMQ + NMS = Stalled Message Queues
Date Thu, 28 Aug 2008 21:30:12 GMT
Hi Jim,

We're currently using transactional messages.  What we do is the following:

- create connection factory
- create session (acknowledgement mode = transactional)
- create consumer
- bind handler to consumer.Listener

in the handler we do the following:

- handle message
- grab reference to session (stored as an instance variable)
- commit session if sucess, rollback if failure

If we were to switch from transactional to client acknowledge, then I would
understand calling message.Acknowledge().  If for some reason we failed to
handle the message, how should we deal with it?  Should we pop it back into
the queue and then call acknowledge?  Call acknowledge and then pop it back
into the queue?  Or do something else entirely? :)

Anyway, I'll play around with the acknowledge method and post back here if I
have any success.  We were originally using "auto acknowledge" and not
explicitly calling acknowledge on the message before we switched over to
handling them transactionally.

Thanks,
Bryan

On Thu, Aug 28, 2008 at 3:42 PM, semog <e.semog@gmail.com> wrote:

>
> Hi Bryan,
>
> I can't get to your source code examples.  My work internet is filtering
> out
> that site.  So, I would first check to make sure that you are calling
> Acknowledge on the received messages.  It may be that the Broker is
> stopping
> the send to your clients, because it thinks they are "slow" (i.e., they
> have
> not responded to the messages it has already sent to them).
>
> Best,
> Jim
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message