Does Solace Support Server-sent Events

Rakesh JS
Rakesh JS Member Posts: 1

wanted to know if solace supports server sent events for creating a streaming API that pushes text messages from server to clients.



  • TomF
    TomF Member, Employee Posts: 405 Solace Employee

    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.

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 898 admin
    edited March 2021 #3

    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:

    *Note we also have a JavaScript SMF API which allows for more use of solace broker features.

  • TomF
    TomF Member, Employee Posts: 405 Solace Employee

    Lol! I read "server-side" events not "server sent" events. Apologies.

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 497 admin

    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.