Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSE: Allow provision of custom EventStreamUnmarshalling in EventSource #1185

Closed
wants to merge 2 commits into from

Conversation

Synesso
Copy link
Contributor

@Synesso Synesso commented Sep 3, 2018

#1183 describes how events that exceed line length of 4096 bytes silently fail, leading to a retry loop.

This PR allows the user to provide their own EventStreamUnmarshalling instance, thereby overriding the default values for maxEventSize and maxLineSize.

It does not fix the silent failure, but allows users to avoid it.

@ennru ennru changed the title Allow provision of custom EventStreamUnmarshalling in EventSource SSE: Allow provision of custom EventStreamUnmarshalling in EventSource Sep 4, 2018
@ennru ennru added the p:sse label Sep 4, 2018
@ennru ennru requested a review from hseeberger September 4, 2018 16:18
Copy link
Contributor

@hseeberger hseeberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Synesso thanks for the great analysis and this PR. While from the sole perspective of Alpakka this might be the right approach, I think the original authors of SSE support for Akka HTTP (Gosh, these were me!) should not have (pseudo) hard coded the limit, but instead made it configurable: if we had an easy way of having a configuration setting like akka.http.sse.max-event-size then both Akka HTTP and Alpakka could benefit from that. WDYT?

(Requesting changes in order to further discuss)

@Synesso
Copy link
Contributor Author

Synesso commented Sep 4, 2018

@hseeberger That sounds perfect. Both akka.http.sse.max-event-size and akka.http.sse.max-line-size. Shelving this PR.

@ktoso
Copy link
Member

ktoso commented Sep 5, 2018

I agree that it should be fixed in Akka HTTP and will review over there, thanks for the help @Synesso

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants