[akka-user] Re: Akka streams "Working with streaming IO" example: Problem when no initial message from server

2017-09-18 Thread Allan Brighton
quit(f) } .map(elem => ByteString(s"$elem\r")) On Sunday, September 17, 2017 at 12:45:00 AM UTC+2, Allan Brighton wrote: > > In the Akka docs > <http://doc.akka.io/docs/akka/2.5/scala/stream/stream-io.html>, in the > section titled "Work

[akka-user] Akka streams "Working with streaming IO" example: Problem when no initial message from server

2017-09-16 Thread Allan Brighton
In the Akka docs , in the section titled "Working with streaming IO", there is an example TCP server: connections.runForeach { connection => // server logic, parses incoming commands val commandParser = Flow[String].takeWhile(_

[akka-user] In Akka docs example "Working with streaming IO": How to shut down ActorSystem when stream completes?

2017-09-13 Thread Allan Brighton
In http://doc.akka.io/docs/akka/2.5.4/scala/stream/stream-io.html, in the example titled "Connecting: REPL Client", the code implies you can type 'q' to end the REPL session, however it doesn't shutdown the ActorSystem, so the process does not exit. What would you need to add to this code to cau

[akka-user] Lightbend Monitoring and jmDNS issues

2017-05-16 Thread Allan Brighton
I was just experimenting with the Lightbend Monitoring tools and following the Getting Started instructions. The target application registers actors with a *location service*, currently based on multicast DNS (jmDN

[akka-user] Re: Aeron errors when network temporarily disconnected.

2016-12-14 Thread Allan Brighton
25 PM UTC-8, Allan Brighton wrote: > > Using akka-2.4.11 on Ubuntu-16.04: If I pull the network plug for a few > seconds while an actor is running I get the errors below. > It looks like akka kills the ActorSystem. How do you prevent this or > recover from it? > (I think it was

[akka-user] Aeron errors when network temporarily disconnected.

2016-12-13 Thread Allan Brighton
Using akka-2.4.11 on Ubuntu-16.04: If I pull the network plug for a few seconds while an actor is running I get the errors below. It looks like akka kills the ActorSystem. How do you prevent this or recover from it? (I think it was the same under 2.4.14 when I tested it) 16:16:57.508 ERROR a.r

[akka-user] Java TestProbe with ReceiveWhile

2016-12-06 Thread Allan Brighton
In the Akka Scala API you can call receiveWhile to receive messages sent to a TestProbe: val msgs = testProbe.receiveWhile(5.seconds) { case x *=> ...* } In the Java API you can do something similar, but I could not find a way to use ReceiveWhile with a TestProbe: final CurrentState[] msgs

Re: [akka-user] akka-http-experimental: Using the spray DSL: how to complete a route with a Source[ByteString]?

2015-01-20 Thread Allan Brighton
avour of the above usage? Thanks, Allan On Tuesday, January 20, 2015 at 1:10:56 PM UTC+1, rkuhn wrote: > > Hi Allan, > > there should in principle be a marshaller that wraps your Source into an > Entity, what is the exact error you are seeing? > > Regards, > > Roland > &

Re: [akka-user] akka-http-experimental 1.0-M2 on java8: tests pass, but internal akka error messages logged

2015-01-12 Thread Allan Brighton
.com/akka/akka/issues/15349) In your test case this is not > a real error but a false positive. > > -Endre > > On Wed, Dec 31, 2014 at 12:54 PM, Allan Brighton > wrote: > > Hi, > > I have a simple akka-http based server and client along with a test case > under

[akka-user] akka-http-experimental: Using the spray DSL: how to complete a route with a Source[ByteString]?

2015-01-07 Thread Allan Brighton
Hi, I know how to do this now using the new akka-http core API, but how would it work using the spray-like DSL? How can I complete an http get using a Future[Source[ByteString]]? import akka.http.model._ import akka.http.server._ ... def route: Route = path("get") { get { par

Re: [akka-user] akka-http-experimental 1.0-M2 on java8: tests pass, but internal akka error messages logged

2015-01-02 Thread Allan Brighton
> > On Wed, Dec 31, 2014 at 12:54 PM, Allan Brighton > wrote: > > Hi, > > I have a simple akka-http based server and client along with a test case > under https://github.com/abrighton/akka-http-test.git. > The test part looks like this: > > test("Test cl

Re: [akka-user] akka-http (experimental) file server

2014-12-22 Thread Allan Brighton
Is there an example http file server and client like this that works with the latest 1.0-M1 version? On Thursday, November 20, 2014 4:11:38 PM UTC+1, rklaehn wrote: > > On Thu, Nov 20, 2014 at 3:31 PM, Allan Brighton > wrote: > > Thanks for the http server example. It works fi

[akka-user] Dead letters from akka-http flow in sbt multi-jvm test

2014-12-02 Thread Allan Brighton
Hi all, I'm using the sbt multi-jvm plugin for a test involving the experimental akka-http (0.11) package. The tests all pass, but on shutdown, I get lots of log warnings like this: [JVM-2] [WARN] [12/02/2014 22:01:45.560] [TestSpec-akka.actor.default-dispatcher-15] [akka://TestSpec/user/$c/f

[akka-user] Re: Basic HTTP client with Akka HTTP

2014-11-20 Thread Allan Brighton
I'm also interested in this. Here is a modified example http client and server that work on 0.11 (based on RĂ¼diger's example): https://gist.github.com/abrighton/acd43a6cd9c0b997c456 Any suggestions are welcome. I also plan to add the capability to upload files using this (with POST), which sh

Re: [akka-user] akka-http (experimental) file server

2014-11-20 Thread Allan Brighton
machine via port 8080 > https://gist.github.com/rklaehn/3f26c3f80e5870831f52 > > to test, use e.g. > > curl http://localhost:8080/Users/rklaehn/tmp/test > > Curl has some options to simulate low bandwidth connections which > allow you to experiment with the chunked encoding

[akka-user] akka-http (experimental) file server

2014-11-19 Thread Allan Brighton
Hi, I'd like to make an akka-http based file server that returns requested large binary files (using chunking and ByteStrings), but haven't found any suitable examples yet. So something like this: case class FileServer(interface: String, port: Int) { implicit val system = ActorSystem() imp

Re: [akka-user] Passing large files as akka streams in actor messages?

2014-11-13 Thread Allan Brighton
stream that you want to handle with akka-stream coming from? > > Before materialization you can pass around Sources and Sinks in actor > messages. After materialization you can pass Publishers and Subscribers in > actor messages as well. > > On Tue, Nov 11, 2014 at 8:15 PM,

Re: [akka-user] Passing large files as akka streams in actor messages?

2014-11-11 Thread Allan Brighton
ing may make actor system less responsive, because > various system messages would possibly not get through in time. > > Better approach for sending very large messages over the network would be > to write custom message serving and retrieval using akka-io. > > On Thu, Nov 6, 2

[akka-user] Passing large files as akka streams in actor messages?

2014-11-06 Thread Allan Brighton
Hi, An actor needs to receive messages containing the binary contents of files that can be around 35mb in size. Rather than sending an actor message containing an Array[Byte] would it make sense to send a message containing an Akka Stream (for example, a Source[Byte])? Would this also work with

Re: [akka-user] Re: Multi-jvm test property settings when using "sbt test"

2014-03-20 Thread Allan Brighton
mplate: > https://typesafe.com/activator/template/akka-sample-multi-node-scala > > Let us know if that solves your problem or not. > > /Patrik > > > On Wed, Mar 19, 2014 at 10:55 PM, Allan Brighton > > > wrote: > >> Correction: The *multinode.max-nodes *pr

[akka-user] Re: Multi-jvm test property settings when using "sbt test"

2014-03-19 Thread Allan Brighton
Correction: The *multinode.max-nodes *property does not need to be set if "sbt multi-jvm:test" is run, but if I run "sbt test", I get: java.lang.IllegalStateException: need system property > multinode.max-nodes to be set On Wednesday, March 19, 2014 10:29:13 PM UTC+

[akka-user] Multi-jvm test property settings when using "sbt test"

2014-03-19 Thread Allan Brighton
Hi, I'm using the settings below for a multi-jvm test. After upgrading to Akka-2.3.0, I got an error stating that I needed to define the *multinode.max-nodes * system property. I added that below and now it works when I run "sbt multi-jvm:test", but I can't figure out how to add the setting so t

[akka-user] Sbt multi-jvm test in subproject and parallel execution

2014-03-12 Thread Allan Brighton
Hi all, I have a multi-jvm test in a subproject that runs fine if I am in the project, but gives "Failed to bind ..." errors when running "test" from the top level project. (One of the actors in the multi-jvm test has to have a fixed port number. It is a "location service" where actors can find

Re: [akka-user] akka-zeromq: How to tell if ZMQ process is running?

2014-01-26 Thread Allan Brighton
gt; def isAlive(host:String, port:Int) = try { > > val s = new Socket(host, port) > > s.close() > > true > > } catch { > > case e: Exception => false > > } > > > On Fri, Jan 24, 2014 at 4:23 PM, Allan Brighton > > > wro

[akka-user] akka-zeromq: How to tell if ZMQ process is running?

2014-01-24 Thread Allan Brighton
Hi, If I create an akka-zeromq client socket like this: val clientSocket = ZeroMQExtension(context.system).newSocket(SocketType.Req, Listener(self), Connect(url)) and there is no ZMQ process running or listening at the given URL, the client socket is still returned normally. And later I