Solace Endpoints
This week I just came into contact with a little bit of knowledge about Solace. I checked the official doc for several basic concepts. Here I summarize it, mainly the relationship between Endpoints, Queue, Topic, and Subscription.
First of all, Endpoint is the end used to send and receive messages in Solace. It is divided into two types, one is Queue Endpoint, and the other is Topic Endpoint. Both Endpoints can have their own Subscription, which can also be called Topic Subscription. Each Queue Endpoint can have multiple Topic Subscriptions, and each Topic Endpoint can only have its own one Topic Subscription. We can push notification to the Topic or push to the Queue, but push to the Topic The message in the Endpoint will not only be sent to the Topic Endpoint, but also to the Queue Endpoint that subscribes to it. ( At present, the author’s immature understanding is that each Topic Endpoint must have a Topic Subscription that matches it, so if you push a Topic, at least one Topic Endpoint will receive it, and the Queue that subscribes to the Topic will also receive it, but If pushed directly to the Queue, only the Queue will receive the message)
Next, explain the specific concept in detail, which comes from the official explanation of Solace.
Endpoints
Solace PubSub + event broker supports two types of endpoints for receiving, storing, and delivering guaranteed messages.
Endpoint only has the meaning of local event proxy, and it is not a network-wide concept when consumers must connect to an event proxy with that endpoint. There is no propagation of the existence of endpoints through the event proxy to the event proxy control/routing protocol. Therefore, the event proxy does not enforce endpoint name uniqueness throughout the entire network (see this means that each endpoint is only valid locally and will not directly exchange information with the network, so there is no requirement to have a unique name across the entire network).
Queues
The Queue is both a destination to which the Client can publish messages and an endpoint to which the Client can bind consumers and consume messages. Queues are commonly used in point-to-point (PTP) messaging environments.
Although many consumers can be bound to a Queue, a single message connected to a Queue can only be used by a single consumer.
Topic subscriptions can also be added to queues to deliver messages published to matching topics to the queue. Therefore, queues can also be used in publish and subscribe (Pub/Sub) models.
Queue is much more flexible than Topic Endpoint and is the recommended method for most applications. The use of Topic Endpoint should be limited to JMS applications.
Queue
Queues have an access type that determines how messages are delivered when multiple consumer flows are bound to the queue. Queues can be assigned one of the following access types:
Exclusive: Only one consumer can receive messages at any time, while other consumers can serve as backup connections. That is, only one stream is active. Only the first bound consumer can receive messages. If the first consumer disconnects, the second consumer will receive data, and so on. The exclusive queue always delivers messages in the order in which they are received.
Non-exclusive: Multiple consumers can be bound to a non-exclusive queue. Each consumer is served in a circular fashion. This provides load balancing; however, if the connection fails, the unacknowledged message will be sent to another consumer who has set the resend flag. In this way, messages can be sent to consumers out of order
You can change the access type of a persistent queue, but only after disabling Client access to the queue.
In addition, the access type of the queue does not affect the ability of the client to browse messages on the queue using the queue browser.
Adding
It is recommended to read this paragraph directly.Adding Topic Subscriptions to Queues
At the same timeDelivery Modes
Topic
A topic endpoint attracts messages published to a topic for which the topic endpoint has a matching topic subscription. The topic subscription for the topic endpoint is specified in the Client request to bind the flow to the topic endpoint.
Topic endpoints can be used in the publish/subscribe model. They are equivalent to persistent topic subscriptions in Java Message Service (JMS).