Is there a predefined way to do this in hornetq?
There must be something that could help me in Hornetq api. Even if it's not predefined per se.
I know there are interceptors that could help me intercept StopX messages, then I could somehow (how?) get the messages that are in progress and drop them.
Also I was expecting something more like a smarter last value queue. The last value queue, from what I've read "discard any messages when a newer message with the same value for a well-defined Last-Value property is put in the queue" .. I basically need the same thing only the Last-Values should be discarded based on Another_value.
1 of 1 people found this helpful
In order to stop a message in progress you'd first have to identify which client got the message. Then you'd have to contact that client somehow and tell it to stop processing that message. Accomplishing said tasks when the clients and server are all in the same JVM is one thing, but it's quite different when the clients are distributed across the network. In any case, I can't think of any tools to facilitate the server-side cancellation of an in-delivery message.
In regards to the last value queue...The messages that are discarded are messages that are not in-delivery. Even if there was a "smarter" LVQ as you described it would still only operate on messages which are not in-delivery.
Maybe I could do this the hard way by adding something in a distributed cache and checking at some predefined checkpoints.
Your last answer clarified some things for me. thank you.