Does Solace Support Server-sent Events
wanted to know if solace supports server sent events for creating a streaming API that pushes text messages from server to clients.
Comments
-
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.
1 -
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: https://www.iotforall.com/mqtt-vs-sse
*Note we also have a JavaScript SMF API which allows for more use of solace broker features.
2