That's what ExceptionHandler is for in Akka HTTP:
more docs here:
http://doc.akka.io/docs/akka/2.4.4/scala/http/routing-dsl/directives/execution-directives/handleExceptions.html#description
Happy hakking!
--
Konrad `ktoso` Malawski
Akka @ Lightbend
On 20 April 2016 at 00:49:49, Edmondo Porcu
Hello,
I have a route like the following
post{
complete {
(actor ? msg).mapTo[AResult]
}
}
When my future fails, a generic exception is returned to the client and I
would like to have more control on that. Recovering the future with a error
message doesn't seem a good idea because it
One pretty easy answer to this seems to be to use Http().singleRequest(...)
to construct my own flow (using mapAsyncUnordered) with the behaviour I
desire. I was concerned that singleRequest might have worse performance
than the flow-based interface, but after a look at the source code, they
By following Akka documents, I can start two actors(front-end and back-end)
on the same machine, and they can talk to each other. However, when I tried
to deploy back-end actor to another machine(Linux), I hit error of start
remoting:
Multiple main classes detected, select one
Endre,
This is good to know. Could you please let me know how to configure it as
daemonic?
Thanks,
Yan
On Tuesday, April 19, 2016 at 8:01:45 AM UTC-5, drewhk wrote:
>
> Threads from the pool are released after a timeout. You can make them
> daemonic if you want via configuration.
>
> -Endre
>
Ahhh, I see. Thanks for your patience, that helps.
On Tue, Apr 19, 2016 at 10:26 AM, Johan Andrén
wrote:
> It was more this specific section of the docs I was hoping you'd notice:
>
>
>1. # Configuration for the fork join pool
>2. fork-join-executor {
>
Hi all,
I'm very new to Akka Streams, trying to get the ideas behind the streams
and how to use them. I'd like to make a very simple thing: to connect two
TCP server sockets, but I get stuck with that.
If I have server and client connections, it more or less clear for me:
val conn =
Hi,
I am trying to use akka-http's host-level client-side
Http().cachedHostConnectionPool flow as part of a larger stream for which
items in the stream may have previously failed, and so it wouldn't make
sense to send an HTTP request. In other words, I really want a flow with
type something
It was more this specific section of the docs I was hoping you'd notice:
1. # Configuration for the fork join pool
2. fork-join-executor {
3. # Min number of threads to cap factor-based parallelism number to
4. parallelism-min = 2
5. # Parallelism (threads) ... ceil(available
Thanks, Johan.
I did see that page, but if I understand the dispatcher config, the actor
name you can define can't be a pattern? We define many actors without
simple names like "myActor". In order to define a dispatcher for these
actors, I presume I'd need to make a code change to use that
Hey guys,
I have an application where I expect many clients to connect to via TCP. So
my design is the following. I have these two actor-types:
* Server-Actor - Accepts incoming TCP connections (Uses Reactive TCP -
Stream). Per incoming request i spawn a new "ClientSession" - actor
instance.
Threads from the pool are released after a timeout. You can make them
daemonic if you want via configuration.
-Endre
On Mon, Apr 18, 2016 at 10:02 PM, Yan Pei wrote:
> John,
>
> After I upgrade AKKA to 2.4.4 and AKKA persistence cassandra to 0.12,
> the system.terminate()
Great, thanks for the update. We have other ideas for how to improve this
and will get to it, eventually. There was a quick attempt previously, but
it had to be abandoned because of more urgent things. If someone would like
to take a stab at it this might be a good starting point:
Small update - disabling auto fuse, or pre-fusing (with & without auto
fusing) has an effect (BTW I could not find a way to do this with the java).
Performance is improved by up to 50%.
However, it's still not in the same order of magnitude as other libraries.
It's still at least 1 second for
14 matches
Mail list logo