Destinations, Subscriptions, Endpoints
The following figure shows the basic relationship between destinations, subscriptions, and endpoints.
Session and its Aggregates
Destinations
A destination is an API encapsulation of an address that messages can be published to. A message can be published to one of the following:
- Topic—In a publish/subscribe model, a topic is the addressable destination of published messages. Topics can be grouped in hierarchies, and clients have various options for subscribing to parts of the hierarchy. Direct and Guaranteed messages can be published to a topic.
- Queue—In a point-to-point model, a queue is an endpoint that clients can publish messages to. Only Guaranteed messages can be published to a queue.
Subscriptions
A client can use a topic subscription to indicate that it wants to receive messages published to a matching topic destination. A client’s topic subscription can contain a wildcard to match topics or hierarchies of topics. A topic subscription can be used to receive Direct messages from the Solace message bus or Guaranteed messages from an endpoint.
Endpoints
An endpoint is an abstraction of a holding area that attracts and queues matching Guaranteed messages. An endpoint’s life cycle can either be independent or dependent on a given client’s session or flow state. Two types of endpoints can be used:
- Queues— A queue can be used in a PTP messaging environment, where Guaranteed messages are published to a queue destination and clients can browse and consume the published messages on the queue. When a message is published to a queue, it can only be consumed and acknowledged by one client.
A queue can also be used in a pub/sub messaging environment when a topic subscription is added to that queue. When a queue has an assigned topic subscription, that subscription attracts messages published to that topic.
- Topic endpoints—A topic endpoint can be used in a pub/sub messaging environment. A topic endpoint serves as an attractor for messages published to a particular topic. A topic endpoint is very similar to a queue, in that it is a holding queue for messages.
The JavaScript and Node.js APIs see Endpoints generically as queues. In these environments, queues can have a specific type, which is either "QUEUE", or "TOPIC ENDPOINT".