If n was large enough and your message volume was large enough, the overhead of evaluating the selectors against each message might be a disadvantage to using selectors, but your description makes it sound like those numbers are small enough that that's not a concern. So I agree that you should use selectors.
The page size problem occurs when there are more messages in the persistence store than will fit in the memory store. Only persistent messages are stored in the persistence store, and only if a persistence store is configured. You haven't told us whether either of those things is true, so I can't predict whether you'll run into the problem. Also, destinations aren't durable, subscriptions are. And non-durable subscriptions means that messages for offline consumers will be discarded, so they won't contribute to the page size problem. Tim On Feb 2, 2016 1:38 PM, "sburczymucha" <sburczymuchate...@gmail.com> wrote: > Hello, > > I'm seeking advice on the preferred way to solve following problem: > > I have “n” consumers which needs to subscribe to a non-durable topic(?), > from that topic each consumer needs to receive “global” messages (messages > for all clients) and messages for that specific consumer. > > I was thinking about: > > a) Message selectors on consumer side, for example “(ClientGUID IS > NULL) OR > (ClientGUID = MYOWNCLIENTGUID)”. Messages are sent to topic with either > ClientGUID property set to NULL (this ones goes to all clients) or > ClientGUID property set to a specific client (only that client receives > this > message). > > b) Destination wildcards – each consumer will subscribe to Topic and > Topic.ClientGUID, from producer side messages will be sent to either Topic > (which will send message to all clients) or Topic.ClientGUID (which will > send message to specific client). > > In each case producer have a knowledge on all available client GUIDs. > Number > of messages is very low (in fact, messages are sent when a real user edits > a > row in database) but message have a large size (<2MB). > > I think that message selectors are easier to implement and are more > “natural”. Is there any potential problem with this approach? What about > message selectors and “page size” problem on broker -does it exists when > used with a non-durable topic? > > Thank you, > Best Regards > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Destination-wildcards-or-consumer-selectors-advice-needed-tp4706814.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >