I'm new to Solace PubSub. I'm wondering if it's possible to issue commands into PubSub broker so it can get picked up somewhere else? Or, are only events issued through PubSub broker? Thank you for your time.
TL;DR - yes, the Solace Event Broker can handle command, events, messages, REST interactions and a lot more.
I think it's worth talking at a more architectural level for this question. Let me start by answering some questions of my own:
How does Solace PubSub+ treat messages, commands and events differently? It doesn't. PubSub+ doesn't care about the content (payload) of the message/command/event.
So how do we differentiate between them?
Here is my recommended pattern for commands in PubSub+:
Hi @tomschreck ,
maybe I misunderstand your question.
You can put any payload in your messages that you want.
And if you put a payload as "open door and send ack back" in a message and that consumer reacts accordingly to that message, than yes: You can issue commands via messaging.
(That was a real life example from IoT environments).
Does this answer your question ?
Hi @uherbst . Thank you for response. So, the way I understand things are as follows
command -> command handler -> business process -> event -> event handler(s)
Commands are imperative like 'Create Notification'. Events express things that have happened for example: 'Notification Created'
Typically, for a command, you have a single command handler. For an event, you can have one or more event handlers.
So, from your response, I'm gathering I can issue commands from a system/service into Solace Event Broker for a command handler somewhere else to pick up and process? Is there a way to prevent multiple command handlers from consuming a given command?
Hi @TomF. Thank you for the explanation. That helps a lot. Have a great weekend.
Thanks @tomschreck - it's always great to hear whether an answer has helped or not!