Dropwizard and jersey Server-Sent Events (SSE) Support

637 views
Skip to first unread message

Abdelkader Lahmadi

unread,
Aug 12, 2015, 12:05:04 PM8/12/15
to dropwizard-user
Hello,
Does anyone was able to use SseFeature https://jersey.java.net/documentation/latest/sse.html with dropwizard ?
I tried the example (https://jersey.java.net/documentation/latest/sse.html#d0e11487) of SSE server-side with dropwizard (version 0.9.0-rc3, and also older version) but without any success. The events are only sent when the EventOuput object is closed (server-side), otherwise they are queued (buffered some where).

Thanks for help and insights.
Best

roland...@dutchdomotics.com

unread,
Nov 23, 2015, 8:38:47 AM11/23/15
to dropwizard-user
Hi Abdelkader,

I know this is an old post, but I just spend half the day getting this to work..

I can confirm that the SSE is not send to the client until you call close() on the EventOutput.

Then I ran into a stackoverflow post which refers this issue: https://java.net/jira/browse/JERSEY-3000

Somehow the chunked output is captured by the gzip filter and not send right away.

The workaround is to turn off gzip compression in Dropwizard.

If anyone has a proper solution, I'd be interested :)

Cheers
Roland
Reply all
Reply to author
Forward
0 new messages