In a message-driven architecture, name endpoints after the message contract they carry, not after the technology that moves it. A practical default is: queues and subscriptions get a ..-style name (for example, orders.order.created), handlers get a verb-first name describing the reaction (reserve-inventory), and HTTP-facing endpoints keep resource nouns while exposing the message names inside. The condition that matters most: every producer and consumer must agree on one canonical registry, or the naming scheme quietly fragments as teams add services.
That sounds tidy on a whiteboard. In practice, most naming debates in message-driven systems are really ownership debates wearing a costume. Someone names a queue after the service that reads it, someone else names it after the event that feeds it, and six months later nobody can tell which queue is safe to delete. This guide lays out a repeatable procedure, the trade-offs behind each convention, and the failure modes worth designing against before you have a thousand unconsumed messages.
What counts as an "endpoint" when messages carry the work
The question implicitly assumes endpoints are obvious. They are not, because message-driven architecture has several kinds of addressable things, and they serve different purposes:
Broker destinations — queues, topics, and subscriptions. These are the physical names another system's configuration references. Producers — the code or service that publishes to a destination. Their identity is usually invisible to consumers but important for auditing. Consumers/handlers — the code that reacts to a message. A handler may subscribe to many destinations, and one destination may fan out to many handlers. Request/reply channels — a paired request destination and a reply destination, often temporary. Dead-letter and retry channels — derived destinations that mirror a main endpoint when delivery fails. HTTP or RPC façades — the synchronous edges that sit in front of a messaging backbone and get their own URL-style names.
Naming gets messy when teams collapse these categories. A queue named billing-service tells you who reads it, not what flows through it, so the name breaks the moment billing splits into two services. A topic named order-events is better but still vague: which events, produced by whom, under what version? The conventions below separate the contract from the plumbing, which is the single biggest source of clarity in message-driven naming.
Prerequisites for a naming convention that survives change
Before you rename a single queue, settle four things. Doing the procedure without them produces a nice document nobody follows.
1: A message catalog or schema registry. Names should point at a real, versioned contract. Without this, orders.order.created is just a string; with it, the name resolves to a schema, an owner, and a compatibility policy. 2: A domain ownership map. Each message needs one accountable producing domain. If two services both publish order.created, you have a naming problem disguised as a domain boundary problem. 3: Transport constraints. Broker naming rules differ: some systems restrict characters or length, some are case-sensitive, some reject dots in certain contexts. Check the actual limits of your broker version before committing to a separator. 4: A registry location. One authoritative file, repository, or catalog entry per message, with a code review rule that new destinations require an entry.
A useful catalog entry has: canonical message name, version, producing service, consuming services, payload schema reference, retention and dead-letter policy, and a free-text description. That is enough to make the name falsifiable — if the description and the name disagree, one of them is wrong.
The naming procedure, step by step
Work through these in order. Each step produces an artifact you keep, not just a decision.
Step 1: Classify the message as command, event, or document. A command is a request to do something and has one intended recipient (reserve-inventory). An event is a statement that something happened and may have zero, one, or many consumers (order-created). A document is a data snapshot passed between systems, often bulk or reference data (product-catalog-snapshot). This classification drives everything else, so make it explicit in the catalog.
Step 2: Pick a separator and casing profile and write it down. Two workable profiles: dot-separated lowercase (orders.order.created) if your broker and tooling tolerate dots, or kebab-case with colons for hierarchy (orders:order:created) if not. Also fix casing conventions for handler names (ReserveInventoryHandler, reserve-inventory) and stick to them. Mixed profiles are the leading cause of "duplicate" endpoints that are really the same destination spelled two ways.
Step 3: Name by domain, entity, and intent — in that order. Use .. for destinations. Domain is the producing business capability (orders, payments, shipping), entity is the thing the message concerns (order, invoice, shipment), and intent is the past-tense event or imperative command. orders.order.created reads as "the orders domain reports an order was created." payments.invoice.refund-requested reads as a command or request, depending on your classification.
Step 4: Name handlers by reaction, not by source. reserve-inventory and send-shipping-confirmation describe what the consumer does. This keeps names stable when the trigger changes — a handler subscribed to orders.order.created today and orders.order.updated tomorrow keeps its meaningful name.
Step 5: Derive infrastructure names mechanically. Dead-letter queues, retry queues, and subscription names should be generated from the main name by rule, not by hand. A common pattern is orders.order.created.dlq and orders.order.created.retry.3. Mechanical derivation means a new consumer cannot invent a divergent variant.
Step 6: Register and lint. Add the catalog entry in the same change that introduces the destination. Add a CI check that new destinations match the pattern and exist in the catalog. Without automation, conventions decay within a quarter.
Success check: you can take any destination name, hand it to an engineer unfamiliar with that service, and they can identify the producing domain, the entity, whether it is an event or command, and what they would expect the payload to contain. If they cannot, the name is doing too little work.
Commands vs. events: different naming because they promise different things
Commands and events fail in different ways, and the names should make the difference visible.
A command assumes exactly one intended recipient. Its name should read as an instruction: invoice-issue, shipment-cancel, user-deactivate. Because commands carry an implicit "please do this," they also carry questions that events do not: what happens if the recipient rejects it, what happens if nobody is listening, and how do you detect a lost command? Naming them as imperatives flags that these questions matter.
An event asserts a fact in the past tense: order-created, payment-authorized, invoice-paid. Events are inherently broadcast — any number of consumers may react, and the name should not encode who cares. If you find yourself writing order-created-for-billing, the "for billing" part is consumer knowledge leaking into the producer's name. Move that routing decision into subscriptions instead.
A third category, request/reply, needs both halves named as a pair. pricing-quote-request and pricing-quote-reply beat a single pricing-service destination, because the pairing is explicit and the correlation logic is easier to reason about.
Failure signature: if command and event names look interchangeable in your system, expect consumers to publish "events" that are really commands addressed to a specific team, and expect that team's outages to look like data-loss incidents.
Destinations, handlers, and HTTP façades: naming each layer
The same message passes through several layers, and each layer deserves a name that describes that layer's job.
Destination names carry the contract. orders.order.created is stable across producer rewrites because it names the business fact, not the implementation.
Subscription names (in brokers that model topic-plus-subscription, such as JMS-style systems) identify a consumer group. Name them after the consumer's role: orders.order.created.billing-subscription. The subscription name is where consumer identity belongs, not in the topic.
Handler names belong in code and should be verb-first: ReserveStockOnOrderCreated. This reads as a sentence and makes the reaction obvious in logs and traces.
HTTP façades that front a messaging system flip back to resource naming, because HTTP clients expect it: POST /orders on the command side, GET /orders/{id} on the query side. The façade's job is to translate a resource operation into a message; its URL should not expose the queue name. If your public API looks like /publish/orders.order.created, you have exposed your topology, and every internal rename becomes a breaking API change.
Reply and correlation endpoints should be named with a suffix that makes their temporary or scoped nature obvious: orders.order.created.reply or a generated correlation identifier with a documented prefix. The risk here is orphaned reply queues accumulating because their names look permanent.
Worked example: a small order system named end to end
Consider a modest commerce system with three domains: orders, inventory, and shipping. Applying the procedure gives a table like this:
| Layer | Name | Why |
|---|---|---|
| Command destination | orders.order.place | Imperative; one intended recipient (the orders service) |
| Event destination | orders.order.created | Fact in past tense; multiple consumers allowed |
| Event destination | inventory.stock.reserved | Fact from the inventory domain, not the orders domain |
| Subscription | orders.order.created.shipping-subscription | Consumer identity belongs on the subscription |
| Handler | SendShippingConfirmationOnOrderCreated | Verb-first reaction, source visible |
| Dead-letter queue | orders.order.created.dlq | Mechanically derived |
| Retry queue | orders.order.created.retry.3 | Attempt count encoded, bounded retries |
| HTTP façade | POST /orders | Resource-oriented; hides topology |
Read across the table and the division of labor is clear: the destination says what happened, the subscription says who cares, and the handler says what the consumer does about it. Note that inventory.stock.reserved names the inventory domain even though the orders orchestration triggered it — the producing domain owns the event, because it is the one asserting the fact.
If the shipping team later adds a second consumer, they add orders.order.created.analytics-subscription; nothing upstream changes. If the orders service is rewritten in a different language, the destination name survives. That stability under change is the actual test of a naming scheme.
Versioning, dead letters, and the names people forget
Versioning is where naming conventions most often either earn their keep or quietly break. Two approaches dominate:
Version in the destination name (orders.order.created.v2). This is explicit and lets old and new versions run side by side, but it multiplies endpoints and invites consumers to subscribe to a version rather than a contract. It also means the catalog must track which versions are live and which are retired.
Version in the schema, name stable (orders.order.created with a registry-managed schema version). This keeps the destination count flat and pushes compatibility into the schema registry's rules, but requires disciplined backward-compatible evolution and a clear policy for breaking changes, usually a new destination name with a deprecation window.
Neither is universally right. Choose based on whether your consumers can upgrade independently and whether your schema tooling enforces compatibility. Whichever you choose, document the retirement procedure: who announces a deprecated destination, how long it lives, and how you verify no consumer remains.
Dead-letter and retry channels deserve names too, and they are the most commonly forgotten. Name them by mechanical derivation from the main destination, include the retry attempt, and include an explicit terminal name like orders.order.created.parking for messages that exhausted retries. Without terminal naming, teams disagree about whether a message in the "DLQ" is still retryable, and messages either get replayed forever or dropped silently.
One more forgotten category: audit and replay streams. If you fan messages into an archive, name it after the source with a suffix (orders.order.created.archive), not after the storage system. The name should still answer "what messages are in here?"
Failure modes, anti-patterns, and how to audit an existing system
Messy naming accumulates gradually, so auditing is cheaper than redesigning. Here are the signatures worth hunting for, and the fix for each:
Service-named endpoints (billing-queue). Symptom: the name describes a deployment, not a message. Fix: rename to the message contract and move service identity to the subscription name. UI or team names baked in (for-mobile-app, team-alpha-topic). Symptom: routing logic encoded in the name. Fix: move filtering into message attributes or subscriptions. Producer and consumer verb disagreement (orderCreate vs OrderCreated vs order-created). Symptom: duplicate destinations that are the same concept. Fix: enforce one casing profile in CI and reconcile in the catalog. Unbounded naming growth (a dead-letter queue for every consumer, plus retries, plus archives). Symptom: hundreds of destinations with no owner. Fix: derive infrastructure names mechanically and add owner metadata to the catalog. Names that skip the domain (created, updated). Symptom: collisions across domains. Fix: domain-first naming. Version sprawl (orders.order.created.v1 through .v7 live simultaneously). Symptom: no deprecation discipline. Fix: publish a retirement policy and verify consumer counts before deleting.
An audit that takes a day can usually recover an inventory: pull destination names from the broker's management API, pull handler names from code, and diff them against the catalog. The destinations with no catalog entry are the ones that will surprise you in an incident.
Stop condition: if an audit finds destinations carrying production traffic with no identifiable owner and no schema, do not rename them unilaterally. Trace consumers first, notify owning teams, and treat the rename as a coordinated migration with a dual-publish window. Renaming a live, unowned queue is how you turn a naming cleanup into an outage.
A workable convention you can adopt next week
If your system is small or your conventions are inconsistent, this compact scheme covers most needs without a committee:
1: Destinations: domain.entity.intent in lowercase, dots as separators, past tense for events, imperative for commands. 2: Subscriptions: destination.consumer-subscription, where consumer names the consuming domain or role. 3: Handlers: verb-first, source mentioned, in your language's casing style. 4: Infrastructure: mechanically derived suffixes — .dlq, .retry.N, .parking, .archive. 5: HTTP façades: resource nouns, verbs expressed by HTTP method. 6: Every destination gets one catalog entry with owner, schema, and description; CI rejects unregistered destinations.
That is short enough to memorize and specific enough to enforce. The test of any convention is not whether the committee approves it, but whether an engineer can predict the correct name for a new message without asking anyone.
Frequently asked questions
Should message names be singular or plural?
Use singular for the entity in the name (order, not orders), reserving the plural for collections or batch streams. orders.order.created reads as "the orders domain's order was created." Mixing singular and plural across teams is a small thing that generates outsized confusion in search and tooling.
Where should version numbers live — in the name or the schema registry?
Use the registry by default and reserve name-level versions for breaking changes with a published deprecation window. Name-level versions multiplied across many consumers get expensive to track, and they tempt consumers to pin to a version rather than a contract. The right answer depends on whether your consumers deploy independently, so state the choice in the catalog rather than leaving it to habit.
Does this scheme work for Kafka topics, RabbitMQ queues, and SQS?
The concepts transfer, but the mechanics differ. Kafka topics map naturally to the destination layer, while consumer identity shifts to consumer groups. RabbitMQ routing keys and exchanges add a layer that some teams use for the intent segment. SQS has a 80-character name limit in many configurations and disallows dots in FIFO queue names, so verify the broker's constraints before committing to a separator — the naming principle survives, the exact string may need adjusting per transport.
How do we handle endpoints that already exist and are in production?
Audit first, catalog second, rename third and only with coordinated dual-publish. New names should be adopted for new messages immediately; existing destinations get a documented migration plan with a verification step that confirms no traffic remains on the old name.