Mixing in this trait lets a HttpEntity
with a text/event-stream
media
type be unmarshallable to an EventStream
.
This stream processing stage establishes a quasi-continuous EventStream from the given URI.
Importing EventStreamUnmarshalling.feu lets a HttpEntity
with a
text/event-stream
media type be unmarshallable to an EventStream
.
(Since version 2.0.0-M6) Use EventSource instead!
This stream processing stage establishes a quasi-continuous EventStream from the given URI.
A single EventStream is obtained from the URI. Once completed, either normally or by failure, a next one is obtained thereby sending a Last-Evend-ID header if available. This continues in an endless cycle.
The shape of this processing stage is a source of ServerSentEvent. To take effect it must be run. Progress (including termination) is controlled by the connected flow or sink, e.g. a retry delay can be implemented by streaming the materialized values of the handler via a throttle.