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

2017-09-18 Thread Allan Brighton
.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 "Working with streaming I

[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

[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

[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

[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[]

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
, 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 7 jan 2015 kl. 14:00 skrev Allan Brighton alla...@gmail.com

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
) 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 alla...@gmail.com javascript: wrote: Hi, I have a simple akka-http based server and client along with a test case under https://github.com/abrighton/akka-http

[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 {

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
with a clean shutdown (FIN) but a connection reset (RST), which causes an error event in the stream. (The logging is a bit verbose here see https://github.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

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 alla...@gmail.com javascript: wrote: Thanks for the http server example

[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]

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

2014-11-20 Thread Allan Brighton
://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. On Wed, Nov 19, 2014 at 6:49 PM, Allan Brighton alla

[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()

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

2014-11-13 Thread Allan Brighton
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, Allan Brighton alla...@gmail.com

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

2014-11-11 Thread Allan Brighton
, 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, 2014 at 4:25 PM, Allan Brighton alla...@gmail.com javascript: wrote

[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
-scala Let us know if that solves your problem or not. /Patrik On Wed, Mar 19, 2014 at 10:55 PM, Allan Brighton alla...@gmail.comjavascript: wrote: 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

[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

[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+1, Allan Brighton wrote

[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