Questions tagged [akka-http]

The purpose of the Akka HTTP layer is to expose Actors to the web via HTTP and to enable them to consume HTTP services as a client. It is not an HTTP framework, it is an Actor-based toolkit for interacting with web services and clients.

The purpose of the Akka HTTP layer is to expose Actors to the web via HTTP and to enable them to consume HTTP services as a client. It is not an HTTP framework, it is an Actor-based toolkit for interacting with web services and clients.

More Info:

1489 questions
6
votes
1 answer

Kafka message to websocket

I am trying to write a Kafka consumer to websocket flow using reactive-kafka, akka-http and akka-stream. val publisherActor = actorSystem.actorOf(CommandPublisher.props) val publisher = ActorPublisher[String](publisherActor) val commandSource…
vishr
  • 985
  • 10
  • 28
6
votes
2 answers

AKKA-http deployment

This is the first time I'm working with akka-http. I wrote the following main class which starts the application: object Main extends App with Routes with Config with Protocols { implicit val system: ActorSystem = ActorSystem("slickboard-system") …
Corne Elshof
  • 199
  • 3
  • 9
6
votes
1 answer

Akka HTTP 2.0 to use SSL (HTTPS)

I am trying to add a self signed certificate to my configuration in order to make my web service to serve content over SSL but I had no luck. Here is my current configuration ssl { jksKeystore = "localhost.p12" password = "changeit" } Any ideas…
Lucian Enache
  • 2,510
  • 5
  • 34
  • 59
6
votes
1 answer

Extracting Path Head in Akka Directives

I am using akka directives to match a particular path pattern: /item/quantity Examples would be /apples/100 /bananas/200 The possible items (e.g. "apples", "bananas", ...) is not known in advance, therefore hard-coding the items using path is not…
Ramón J Romero y Vigil
  • 17,373
  • 7
  • 77
  • 125
6
votes
3 answers

How to stop gracefully the actor system for an akka-http server that must be deployed.

I just created my first rest server with akka-http. The problem is that I do not know how to deploy the server in such a way that I could gracefully shutdown the actor system. For example I found something here:…
Emanuel Lal
  • 61
  • 1
  • 4
6
votes
1 answer

How to make HTTPS (not HTTP) request use akka-http?

I am using the following code to make HTTP request with akka-http library inside of Akka Actor: implicit val materializer = ActorFlowMaterializer() implicit val system = context.system val request = HttpRequest(HttpMethods.GET, "http://ya.ru") val…
Maxim
  • 9,701
  • 5
  • 60
  • 108
6
votes
1 answer

Outgoing connection stream closed

I have an actor with the behaviour: def receive: Receive = { case Info(message) => val res = send("INFO:" + message) installAckHook(res) case Warning(message) => val res = send("WARNING:" + message) …
almendar
  • 1,823
  • 13
  • 23
6
votes
1 answer

How to handle response timeout?

In akka-http routing I can return Future as a response that implicitly converts to ToResponseMarshaller. Is there some way to handle timeout of this future? Or timeout of connection in route level? Or one way is to use Await() function? Right now…
diemust
  • 110
  • 2
  • 7
6
votes
1 answer

Akka-http Java API sample code/documentation

Could anyone point me to a working sample of akka-http using the JAVA API. Thanks in advance.
user2989124
  • 183
  • 2
  • 12
6
votes
2 answers

could not find implicit ...: akka.http.server.RoutingSetup

While playing with, akka-http experimental 1.0-M2 I am trying to create a simple Hello world example. import akka.actor.ActorSystem import akka.http.Http import akka.http.model.HttpResponse import akka.http.server.Route import…
Nitin...
  • 1,274
  • 10
  • 18
6
votes
1 answer

Streaming Video or (Stream of unknown length) using Akka-Http

I am working on the akka-http(akka-http-experimental_2.11 - 0.4) for an experimental project. and I have not worked on Spray before. I would like to stream an mp4 video(size can vary) to browser. But I dont know how to create the HttpEntity for the…
S.Karthik
  • 1,389
  • 9
  • 21
5
votes
1 answer

Scala and Akka HTTP: Request inside a request & issue with threads

I am new to learning Scala, Akka Streams and Akka HTTP, so apologies beforehand if the question is too basic. I want to do an HTTP request inside an HTTP request, just like in the following piece of code: implicit val system =…
Stratos K
  • 341
  • 2
  • 14
5
votes
2 answers

Handling PATCH requests with Akka HTTP and circe for nullable fields

Is there a common approach to handle PATCH requests in REST API using circe library? By default, circe does not allow decoding partial JSON with only a part of the fields specified, i.e. it requires all fields to be set. You could use a withDefaults…
Alexey Sirenko
  • 452
  • 3
  • 12
5
votes
0 answers

Does "EntityStreamException: Entity stream truncation" simply mean client timeout?

Since upgrading to Play 2.6, I'm seeing a lot of "EntityStreamException: Entity stream truncation" in our logs. It looks to strongly correlate with a client timeout, which is not alarming. It is a little alarming to have an Exception bubble up to…
Adam Rabung
  • 5,232
  • 2
  • 27
  • 42
5
votes
1 answer

Akka http memory leak with web socket

I have a web server that accepts incoming websocket connection, implemented with akka http in Scala. However, I've been observing a monotonic increase in my app's memory usage. After some long digging, I found out that some internal Akka objects are…
user1861088
  • 1,683
  • 2
  • 15
  • 17