When would you use Spark.publish() vs. Server-Sent Events (SSE)?

Both Spark.publish and Server-Sent Events (SSE) seem to provide a mechanism whereby the caller can block to get a notification from the Spark Core.

Just wondering about the use case scenarios for either. Are they both the same thing?


They are indeed the same thing. A Spark.publish() is what you use to trigger a Server Sent Event.


OK, thanks.

1 Like