1

Does ActiveMQ have suppport for subtopics? How do you define hierarchies of topics? Is there some naming convention to define the hierarchy relationships?

1 Answer 1

3

ActiveMQ supports subtopics in a virtual sense only, in that "subtopic-ness" is defined by naming convention, and subscriptions can use wildcards to view multiple topics.

As an example you might have a topic called announcements, to which you post messages. You then find that you want to divide between subjects of those announcements. In this case you would publish to different "subtopics" which are usually defined by convention using the "." character. Physically there is no subtopic created, just another topic with that name.

So you might now publish messages to announcements.product and announcements.company. If you want to consume from either of these, you subscribe as normal by name. If you want to consume all announcements, you would use ActiveMQ's wildcard mechanism, and subscribe to accouncements.>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.