Using JMS Selectors vs in-memory filtering

198 Views Asked by At

I have a requirement to read messages from queue that gets filled in via Virtual Topic. Contemplating to have a JMS selector to read only the messages I require in the listener - but since I don't want the messages to be in the queue - I can either implement another listener which reads the remaining messages and just acknowledges it OR I can do it a single listener which doesn't have a JMS Selector but does this filtering in memory. Which approach is recommended?

1

There are 1 best solutions below

0
On

I think you should use the selectors. Filtering in memory sounds like reinventing the wheel and probably no as safe.