In the Solace Java API, I can create a persistent messaging queue using
MessagingService.createPersistentMessageReceiverBuilder()
The above takes a Queue.durableNonExclusiveQueue() or Queue.nonDurableNonExclusiveQueue(), with similar methods for an exclusive queue as well.
There's a MessagingService.createDirectMessageReceiverBuilder(), but it effectively only takes Topics via the .withSubscriptions(). I didn't see a way to create a direct queue.
I'm confused on the definitions Solace uses:
- Direct means the destination topic does not have to be listening at the time. It does not hold the messages until something can process it. I don't know why they didn't call it non-persistent.
- Given there's a "persistent" word being used, I don't then know what "Durable" means. I would have thought it would mean that somehow Solace preserves the messages so that if Solace goes down, all the messages are written to disk and not just in volatile memory. Again, what's the difference between Durable and Persistent?
- Did they not have a direct queue thinking it would be hard to make usable by the receiving party? I'm sure there's some big reason it's not there based on my understanding.
- In PubSub+, I think messages can be pushed with a simple topic added to it. Is that peristent? Is that durable?
These are questions I had after reading @tamimi-ahmad's answer. Due to length, I'm putting them here:
"Think of queues on the Solace broker as nothing but another client that is subscribing to topics. Which means that you can add topic subscriptions to queues that attracts the messages you want, and any client that is bound to the queue will consume the messages in it."
Let's say I wanted to put data in Solace. Let's call it a Message. I want to get it from the content creator to whoever cares to listen. At no time, does the API allow me to specify the Queue that it lands on, yet it's possible to see messages "queued" on the queue. In Solace, is a queue really just messages that got sent to a certain topic (or multiple topics via wildcard)? In otherwords, you'd never directly send to a queue?
Perhaps this is moot, but why can't you create a NON_DURABLE, NON_EXCLUSIVE Queue?
Solace allows a persistent message receiver via messagingService.createPersistentMessageReceiverBuilder(). Why can't you do messagingService.createDirectMessageReceiverBuilder()? Can you not receive direct messages?
I still don't understand the difference between Persistent and Durable. I'm guessing Persistent is used for messages published, yet durable is for when they get matched to a topic subscription and are saved for later consumption.
Using the API, I can create a named persistent receiver using
receiver = messagingService.createPersistentMessageReceiverBuilder().build(queue);
Why can't I name a DirectMessageReceiver?
- What is the best way to cache a MessageReceiver and a MessagePublisher in Spring Boot?
- I read the article on message promotion. One thing it said to do was avoid message promotion due to unwanted "backpressure" saving on an endpoint. I think backpressure essentially is the time and WIP cost due to saving a message. I gather it's somehow worse to save that message at the time it gets matched to a queue than when it was first published. Is that right?