Hi,

Im porting code from spray to Akka HTTP. Routing DSL is quite easy, but I 
have problems with chunked encoding needed for SSE. In spray it is simple: 
I just send MessageChunks to spray's "responder". In Akka there are two 
problems:

1. How do I combine routing DSL with raw 
HttpResponse(entity=HttpEntity.Chunked(chunks=...))?
2. How do I produce SSE events?

Examples 
like 
https://gist.github.com/rklaehn/3f26c3f80e5870831f52#file-file-server-example 
are not helpful for me.

Regarding second point: there is Source.actorRef(...) but how do I get 
materialized ActorRef from it? HttpEntity.Chunked expects just Source 
instance. There is also Source.actorPublisher(...). I can write my Actor 
conforming to ActorPublisher's protocol and from inside connect to my 
SSE-producing Actor, but i thought that getting ActorRef from 
Source.actorRef will be easier.

I am using akka-http-experimental 1.0

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to