Hi all,
We have a
j2ee application where a JMS queue notifies clients (consumers) about their elaboration process.
In other words when the client is connected it should receive messages like "Elaboration started", "Elaboration completed" and so on.
Since there are many clients, I have added to the message a clientId property so that inside onMessage the message is acknowledged only if it "belongs" to the client. (CLIENT_ACKNOWLEDGE).
Here comes the problem.
Suppose "Elaboration started - client 1" message goes to client 2 (which refuses the message) and meanwhile "Elaboration completed - client 1" goes to client 1 (whick acks the message and close connection)
then client 1 will never receive the first message because the connection is closed !
I hope my explanation is clear.
How would you correct this architecture ? I'm thinking to add a sequence number to the message so that they are ack'ed in the right order......maybe there are some feature of jms I miss which could be better.....like jms temporary queues ?
any idea ?
Thanks
Francesco