A simple server-sent events server that supports multiple concurrent clients, and properly handles client-side disconnects. Uses Jooby 2.
TLDR — Camel can't be used as an SSE consumer.
Documenting this here since I created this server to test if Camel can be used as an SSE consumer.
Camel doesn't seem to have a component for this (as at version 3.9.0) and the built in HTTP support does not seem to nicely handle it — there is no support for from('http://...')
and using to('http://...')
will not return a response until the response stream closes (which is entirely reasonable).
Tested with both the http
and ahc
components.
I know that Camel does work as a WebSocket consumer, so there is not a lot of point in spending more time on this.