I'm in the process of adding a message broker (ActiveMQ Artemis) to a system currently and while I have my own notions on how I can divide up the namespace, it seems like a good time to get opinions from others on how they like to name their queues and topics.
The overall topology I'm after is to support functionality grouped in two ways:
- By technology and/or library. This is when messages that enter the system are defined by a specific application level library. Think Laravel queues, or Mass Transit in .net. This first convention allows me to sequester message activity on the broker per-library as they often feature proprietary conventions and function under the assumption that they own their messaging space exclusively.
- By business domain. This one is a little more abstract, but is defined by the various sections of my ecosystem. It's intended to facilitate messaging between applications that might be written in different languages. For example, perhaps I have a queue name of
my-org:identityand this represents general user activity (CRUD). I might also have a
my-org:blogto represent events and activity on blog posts that I wish to broadcast and react to. These could be subscribed and published to using libraries built around protocols like AMQP or STOMP, etc. from within different languages.
Acknowledging that you can't 100% predict the future are there any insights, lessons-learned and intuition worth heeding when coming up with naming conventions within a messaging system?