I'm having trouble with my receiver's onMessage method handling
shutdown messages correctly.
I first implemented my receiver so that it did a .receive() call for
all its messages. This worked fine. When I received a message it would
recongize what to do with the message and discern when it received a
shutdown message and shutdown as requested.
I've modified the code to listen for messages with the onMessage method,
and now when I send a shutdown message although it does act on the
message and correctly shutdown, if I restart the receiver it
immediately shuts down again because the original shutdown message was
never removed from the queue.
My session was created with
createQueueSession(false, Session.AUTO_ACKNOWLEDGE) so I assume that
once the onMessage method returns it consumes the message. Could it
be that I am making a call to my shutdown routine in my onMessage
method and therefore the onMessage method never returns, i.e.
acknowledges receipt? If so how should I go about processing the
shutdown message request?
BTW, I've had the same problem with SwiftMQ 1.2 and 2.0.
Thanks,
Dan
--
Daniel Kirkdorffer
Redmond Office: 425-376-0505 x241
Sr. Consultant, WebVision
Email: [EMAIL PROTECTED]
Web: http://www.webvision.com/
------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/[email protected]/