wanted to know if solace supports server sent events for creating a streaming API that pushes text messages from server to clients.
Hi @Rakesh_JS , I’m tempted to just say “yes” and leave it at that
Solace uses a brokered publish/subscribe pattern. The broker is the server and your applications are clients in this model, but anyone can send to anyone. Your “server” application can send to any number of “client” applications.
Regarding “text messages,” we send any data you send us to wherever it needs to go. It can be text, binary, a cat video… anything. Essentially, the interpretation of what you’re sending is decided by you. We have helper routines/classes that will, say interpret a message as text.
Hey @TomF I think @Rakesh_JS is referring to the Server-Sent Events capabilities standardized as part of HTML5. Solace Event Brokers don’t currently support SSE, but I’d love to hear more about your use case for using them @Rakesh_JS . We usually direct folks towards using MQTT over websockets since it’s still lightweight while also allowing for bi-directional communications which is a shortcoming of SSE.
There is a short comparison of SSE & MQTT here: MQTT vs SSE: A Comparison | IoT For All
*Note we also have a JavaScript SMF API which allows for more use of solace broker features.
Lol! I read “server-side” events not “server sent” events. Apologies.
Also, we can do HTTP Webhooks out of the broker… every message that lands on a particular queue can get either POST or PUT to a defined URL.