I need to publish a large number of [header only] messages, each of which belongs to a unique category. Consider:
A.B.C.D.E.F
Ideally, all other considerations aside, I would like to publish each message on its own topic but this could result in thousands of topics. The benefit is a very simple wildcard based subscriber model. I am just not sure what the baseline memory usage is of a single topic and the aggregate usage of thousands of them.
For tuning, the topics will be non-persisted and non-durable. If possible, I could also limit the number of messages to 1 at a time, where an older message would be dropped. Messages will be published in waves every n seconds (usually > 15s). This would the reduce the memory usage.
My alternative is to publish to topics based on the first 2 segments like:
A.B
and put the rest of the segments in keyed headers. Subscribers would then have to use a combination of topic wildcards and selectors to subscribe to their desired feeds.
Anyone have any insight into this ?
Thanks !
//Nicholas