S
Scott Balmos
Hi all,
Yet another JMS-related question. Is it possible to have the queue
"lock" a JMS message? What I'm considering is JMS in a point-to-point
setup. My main app server sends control messages to management daemons
on other systems. See previous threads by me in the past few days for
background.
Now, to create a type of pseudo-transaction, based on feedback in the
other threads, my main app server would send a control message to the
queue for the service to control (say, queue MailingListMgmt, which is
watched by the daemons controlling the mailing list servers). This
message would be read by the mailing list management servers, and would
only be consumed (and taken out of the queue) if the operation was
successful.
But if I have, say, three mailing list servers, I only want one server
to attempt the operation at a time. E.g. Box 2 reads the mesasge from
the queue first. I'd like to know if it's possible for Box 2 to "lock"
the message in the queue so that Boxes 1 & 3 don't read it, unless the
operations failed on Box 2 and the message isn't consumed. Then Box 2
would "unlock" the message, letting one of the other boxes attempt the
operations.
Is this possible? I was hoping against setting up separate queues for
each physical machine, as then the app server would have to do all the
management of sending the message to one of the other boxes if the
operation failed, etc.
Thanks for any info!
--Scott
Yet another JMS-related question. Is it possible to have the queue
"lock" a JMS message? What I'm considering is JMS in a point-to-point
setup. My main app server sends control messages to management daemons
on other systems. See previous threads by me in the past few days for
background.
Now, to create a type of pseudo-transaction, based on feedback in the
other threads, my main app server would send a control message to the
queue for the service to control (say, queue MailingListMgmt, which is
watched by the daemons controlling the mailing list servers). This
message would be read by the mailing list management servers, and would
only be consumed (and taken out of the queue) if the operation was
successful.
But if I have, say, three mailing list servers, I only want one server
to attempt the operation at a time. E.g. Box 2 reads the mesasge from
the queue first. I'd like to know if it's possible for Box 2 to "lock"
the message in the queue so that Boxes 1 & 3 don't read it, unless the
operations failed on Box 2 and the message isn't consumed. Then Box 2
would "unlock" the message, letting one of the other boxes attempt the
operations.
Is this possible? I was hoping against setting up separate queues for
each physical machine, as then the app server would have to do all the
management of sending the message to one of the other boxes if the
operation failed, etc.
Thanks for any info!
--Scott