Re: [akka-user] Re: Understanding materialized value

2016-01-28 Thread Richard Rodseth
Thank you. I suppose on a Source[T, Unit] the only option for an initial materialized value is something provided externally or accessible through the shape. I don't see any way to access attributes after supplying them, for example. I don't actually have a use case for this now - just curious.

[akka-user] scan and map

2016-01-28 Thread Richard Rodseth
In akka-streams, scan is like fold, in that it takes a zero and a function to do the accumulating, but it emits each accumulated value rather than the final result. But what if I wanted to emit tuples of the accumulated value and the stream element? Is there an operator I've missed or would

[akka-user] Re: Akka remoting binds to hostname instead of bind-hostname

2016-01-28 Thread Just a random guy
Might be because the application I use runs with akka 2.3.4, and it seems there wasn't bind-hostname & bind-port yet in that version. I'm currently upgrading to akka 2.4.1 and retesting. Le jeudi 28 janvier 2016 14:29:07 UTC+1, Just a random guy a écrit : > > I am trying to run an akka

Re: [akka-user] Noob Question. Lifting a function taking one input returning a source into a flow

2016-01-28 Thread Roland Kuhn
Hi Andrew, what you want is Flow[SomeType].flatMapConcat(doStuff). Regards, Roland > 28 jan 2016 kl. 18:45 skrev Andrew Headrick : > > Hi I'm working on grokking creating and manipulating flows. > > I have a function > > def doStuff( id :SomeType )

[akka-user] Noob Question. Lifting a function taking one input returning a source into a flow

2016-01-28 Thread Andrew Headrick
Hi I'm working on grokking creating and manipulating flows. I have a function def doStuff( id :SomeType ) :Source[Stuff,Mat] and I'd like to turn this into a flow Flow[SomeType,Stuff,Mat] It seems like this should be simple but I could be missing something. Any pointers would be appreciated.

[akka-user] Testing a real Source and Flow with TestSink

2016-01-28 Thread Gary Struthers
I'm testing a Flow with TestSource and TestSink "TestSource/TestSink Example" should { "work" in { val (pub, sub) = TestSource.probe[MyClass] .via(myFlow[String]) .toMat(TestSink.probe[String])(Keep.both) .run() sub.request(1) pub.sendNext(myData) val response =

Re: [akka-user] Akka cluster sharding exception propagation to the parent actor

2016-01-28 Thread Владимир Морозов
Hi, I have similar problem, my PersistentActor begin restart forever when inside receiveCommand throws some exception. How I can manage that restarts? Creating actor from BackoffSupervisor not help. Regards, Vladimir понедельник, 16 ноября 2015 г., 18:01:03 UTC+3 пользователь Patrik Nordwall

Re: [akka-user] Noob Question. Lifting a function taking one input returning a source into a flow

2016-01-28 Thread Roland Kuhn
No worries, there are quite a few combinators and it will take a bit to get them all into your head :-) > 28 jan 2016 kl. 21:06 skrev Andrew Headrick : > > Arg. Its so obvious. > > Thanks a bunch. Just what I needed. > > Best, > A > > On Thursday, January 28, 2016

Re: [akka-user] Noob Question. Lifting a function taking one input returning a source into a flow

2016-01-28 Thread Andrew Headrick
Arg. Its so obvious. Thanks a bunch. Just what I needed. Best, A On Thursday, January 28, 2016 at 10:48:48 AM UTC-8, rkuhn wrote: > > Hi Andrew, > > what you want is Flow[SomeType].flatMapConcat(doStuff). > > Regards, > > Roland > > 28 jan 2016 kl. 18:45 skrev Andrew Headrick

[akka-user] Akka 2.4.1 cluster ShardCoordinator not starting

2016-01-28 Thread Rafał Kowalski
Hi, I'm exploring the wonderful world of Akka cluster and sharding at the moment. So far, I've setup just one persistent actor `PublicationActor` and I start the cluster sharding as follows: --8<---cut here---start->8--- ClusterSharding(system).start(

[akka-user] Trying to configure ActorSystems

2016-01-28 Thread Ian Nowland
Hello, I'm trying to configure an ActorSystem, but no matter what I do, seem to be getting the default dispatcher. Here's what I've got going on: val customConf = ConfigFactory.parseString( """ |akka { | | actor{ | |/function-scheduler { | dispatcher =

[akka-user] Re: HTTP header 'UpgradeToWebSocketResponseHeader: ' is not allowed in responses

2016-01-28 Thread shayan
great. thanks. On Thursday, January 28, 2016 at 8:10:23 AM UTC-8, Johannes Rudolph wrote: > > Hi Shayan, > > this seems to be a bug. I filed it here: > https://github.com/akka/akka/issues/19639 > > The functionality shouldn't have changed, though, so you can safely ignore > this output. > >

Re: [akka-user] ANNOUNCE: Akka 2.4.1-RC1 (including streams and http)

2016-01-28 Thread Johan Andrén
Hi Jacob, Yes, GitHub master is where we work on what will be Akka 2.4.2. getStageActorRef has been renamed to getStageActor and the signature has changed somewhat. The online API Scaladoc can be found here: http://doc.akka.io/api/akka/2.4.2-RC1 -- Johan Andrén Typesafe - Reactive apps on the

Re: [akka-user] Re: Understanding materialized value

2016-01-28 Thread Viktor Klang
mapMaterializedValue -- Cheers, √ On Jan 28, 2016 5:04 AM, "Richard Rodseth" wrote: > I've since become aware that for something like counting a parent stream > for monitoring purposes I could use alsoTo to a counting sink. > But I'm still curious how a Source[T, Unit]

Re: [akka-user] WeaklyUp - possibility of accepting returning nodes

2016-01-28 Thread Andrzej Dębski
In situation where you have 2 unreachable nodes even if weaklyUp=true new incarnation of old node will not join the cluster until other unreachable nodes are also down, but we could still accept any number of fully new (not new incarnations of nodes) and set them to weaklyUp. I think this is a

[akka-user] Re: Unusual race condition when using TestActorRef.create

2016-01-28 Thread Michael Patel
Thanks, i'm aware of the default timeout. However, unless I don't understand the behaviour correctly, it wouldn't be relevant, because in the error case the message has been delivered to dead letters, and so would never arrive to its intended destination regardless of how long the test waits.

Re: [akka-user] [akka-actor] ActorSystem Singleton Database Connection

2016-01-28 Thread leslie . leder
Thanks. It would really works that way. On the other hand its a kind of awkward workaround. I already have the configured connection context object at hand. I get it via dependency injection and would like to pass it to the extension or actor system directly. Since I cannot pass objects of

Re: [akka-user] WeaklyUp - possibility of accepting returning nodes

2016-01-28 Thread Patrik Nordwall
On Tue, Jan 26, 2016 at 4:00 PM, Andrzej Dębski wrote: > I encountered "issue" similar to one described in > https://github.com/akka/akka/issues/18067 and after that I read > https://github.com/akka/akka/issues/13584 which mentions issue 18067 > "Taking note of that we

Re: [akka-user] Noob Question. Lifting a function taking one input returning a source into a flow

2016-01-28 Thread Dragisa Krsmanovic
Hi Andrew, You need Source and Sink. Then the simplest thing you can do is. source.map(...).runWith(sink) On Thu, Jan 28, 2016 at 9:46 AM Andrew Headrick wrote: > Hi I'm working on grokking creating and manipulating flows. > > I have a function > > def doStuff( id

Re: [akka-user] [akka-streams] How to deal with input Streams

2016-01-28 Thread Ryan Stradling
And of course I find the solution right after I post. :) :( val f = source.via(flow).flatMapConcat(identity).runForEach(println(_)) That solves both the interleave and the source of sources On Thursday, January 28, 2016 at 8:46:45 PM UTC-5, Ryan Stradling wrote: > > I have simplified the

Re: [akka-user] [akka-streams] How to deal with input Streams

2016-01-28 Thread Ryan Stradling
I have simplified the example further and got rid of some mistakes. However, I effectively end up with a type of Source of Source. This does not seem correct to me. Is there a way to flatten that given the code below? In addition, how can I make it so all of the first documents are

[akka-user] Re: HTTP header 'UpgradeToWebSocketResponseHeader: ' is not allowed in responses

2016-01-28 Thread Johannes Rudolph
Hi Shayan, this seems to be a bug. I filed it here: https://github.com/akka/akka/issues/19639 The functionality shouldn't have changed, though, so you can safely ignore this output. Johannes On Wednesday, January 27, 2016 at 9:19:46 AM UTC+1, sha...@gearzero.com wrote: > > Team, > > I am

[akka-user] Re: Http().serverLayer as Reverse-Proxy on top of Source(s)[ByteString] ?

2016-01-28 Thread Michael Zinsmaier
Hey yonatan, yes we are using that at the moment. I dug a bit in the actual Akka code and to my understanding for each HTTP Connection a .serverLayer is created => actually using it wired together with a ByteString source should work fine. However it is still mainly inteded for a HTTP server