Re: [akka-user] Akka-Persistence deleteMessages not deleting messages?

2015-12-02 Thread Harit Himanshu
2 > > On Wed, Dec 2, 2015 at 4:48 AM, Harit Himanshu < > harit.subscripti...@gmail.com> wrote: > >> hmm, interesting, I will probably test it again in sometime and update >> the results here. Thanks a lot Patrik >> >> On Tue, Dec 1, 2015 at 10:41 AM,

Re: [akka-user] Akka-Persistence deleteMessages not deleting messages?

2015-12-01 Thread Harit Himanshu
) compaction process. > /Patrik > sön 29 nov. 2015 kl. 16:10 skrev Harit Himanshu < > harit.subscripti...@gmail.com>: > >> Hello there >> >> This is interesting as I was learning about snapshotting and deleting >> messages in Akka-Persistence. I ran the sam

[akka-user] Akka-Persistence deleteMessages not deleting messages?

2015-11-29 Thread Harit Himanshu
Hello there This is interesting as I was learning about snapshotting and deleting messages in Akka-Persistence. I ran the same class with and without the line deleteMessages(metadata.sequenceNr - eventDeleteOffset) in the following code. I am running this with leveldb. The following are the

[akka-user] Deleting Specific Message in Akka-Persistence

2015-11-27 Thread Harit Himanshu
Hello there, I am working on akka-persistence and my use case looks like following - Jobs are submitted to PersistentActor, which are then journaled to leveldb. I also maintain a state variable (as shown in the akka docs )

[akka-user] Re: akka.persistence, snapshots and deleting messages from journal

2015-11-27 Thread Harit Himanshu
. seqNum:150, timeStamp:1448671120681 message deleted till sequenceNumber: 90 message deleted till sequenceNumber: 140 The state still tells me that I have 150 events since on every deleteMessage I am not updating up the state. But I wanted to check if this is recommended way to do it Thanks + H

[akka-user] Akka Customers

2015-10-20 Thread Harit Himanshu
Hello I am introducing Akka framework in my company and as part of presentation to Management, I have to add a slide telling them which companies are already using it. Is there a comprehensive list of customers who use Akka? Thanks very much + Harit Himanshu -- >>>>>>>&

Re: [akka-user] Re: Behavior of Akka when you sleep in an actor

2015-10-18 Thread Harit Himanshu
A dumb question. I was in such a situation recently and have been sleeping threads in Java. I got so much used to it that now I had trouble telling Actor what "heavy work" it should do to stay busy. My solution was File.createTempFile("someRandom", "txt") couple of thousand time (so Actor was

[akka-user] Re: No Tests to run for MultiJvm

2015-10-18 Thread Harit Himanshu
istenerSpec > > The class name always created using format XXXMultiJvmNodeN and you create > one class per node you want test > > > On Sunday, October 18, 2015 at 5:18:08 AM UTC, Harit Himanshu wrote: >> >> Hello everyone, >> >> I started learning akka-cluster

[akka-user] No Tests to run for MultiJvm

2015-10-17 Thread Harit Himanshu
} override def beforeAll() = multiNodeSpecBeforeAll() override def afterAll() = multiNodeSpecAfterAll() } And the entire code is available on GitHub <https://github.com/hhimanshu/akka-cluster-investigation>. I would really appreciate if some one could help me spot my issue here. Thanks + Hari

[akka-user] No Tests to run for MultiJvm

2015-10-17 Thread Harit Himanshu
com/hhimanshu/akka-cluster-investigation>. I would really appreciate if some one could help me spot my issue here. Thanks + Harit Himanshu -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ:

[akka-user] Re: How to debug Akka-Stream?

2015-10-11 Thread Harit Himanshu
and $ wc -l out.log 15070 out.log so it halts for line 15071 which is 2564 bytes. But why is it not throwing exception? How do I handle this? On Saturday, October 10, 2015 at 5:11:34 PM UTC-7, Harit Himanshu wrote: > > Hello there! > > I am trying to build a processing pipeline for a

Re: [akka-user] Akka-Stream not truncating and failing

2015-10-11 Thread Harit Himanshu
re if this would have any performance hits. My apologies, I am new and have questions that I can not find answers to. Thank you + Harit Himanshu On Sun, Oct 11, 2015 at 6:22 PM, Harit Himanshu < harit.subscripti...@gmail.com> wrote: > Thanks Konrad > > This is insightfu

[akka-user] How to debug Akka-Stream?

2015-10-10 Thread Harit Himanshu
ver the log lines can be greater than that. Can that be an issue? How do I confirm? 3. As per my code, I do not get back the Materializer when I call run(), so I am unable to shutdown the ActorSystem, what am I missing there? Thank you + Harit Himanshu -- >>>>>>>&

[akka-user] Akka-Stream not truncating and failing

2015-10-06 Thread Harit Himanshu
Hello there, I am new to Akka-Stream and working on a use case where I need to parse log files. These log files have lines separated by new line. I was looked at GroupLogFile.scala

[akka-user] Akka-Http: Exceeded configured max-open-requests value of [32]

2015-08-26 Thread Harit Himanshu
Hello Community, I am writing my first akka-http client and facing this issue. Requirements? 1. Every 10 seconds Akka Actor gets a message that it needs to deliver to server. That code looks like case ecMonitorInformation: ECMonitorInformation = httpPost(/ec/monitor,

[akka-user] Re: Implicit value issue for FromRequestUnmarshaller in akka-http with spray-json

2015-07-28 Thread Harit Himanshu
I have similar issue, how did you people resolve it? On Friday, July 24, 2015 at 2:19:06 AM UTC-7, Kabir Idris wrote: Hi Heiko, Here is my code implicit val system = ActorSystem() implicit val executor: ExecutionContext = system.dispatcher val log: LoggingAdapter =

[akka-user] Can we supervise any non-child actor?

2015-07-25 Thread Harit Himanshu
This requirement may sound weird or may be I am not sure how to solve this problem, I am giving my best shot here to explain with following diagram https://lh3.googleusercontent.com/-VLKTEAgh_cg/VbRnAhnrNII/AHw/aIhdc1CjfxU/s1600/Screen%2BShot%2B2015-07-25%2Bat%2B8.39.01%2BPM.png

[akka-user] Beginner help with Remote Node/JVM Testing

2015-07-24 Thread Harit Himanshu
Hello there, I have been learning Akka and as part of my project I wanted to run the test for my usecase, I need help with it Github link https://github.com/hhimanshu/akka-remote-deployment for my code sample *Scenario* 1. I have 2 Actor Systems - ProcessingSystem and ConnectorSystem.

[akka-user] Akka Remoting: Supervision and Remote Deployment

2015-07-22 Thread Harit Himanshu
Hello I am trying to model a problem as ActorSystem1 in JVM1 with LocalActor ActorSystem2 in JVM2 with RemoteActor What I have now? I start ActorSystem2 (which starts RemoteActor on 127.0.0.1:5150) Then I start ActorSystem1 with LocalActor (which watches RemoteActor on 127.0.0.1:5150)

[akka-user] Re: Testing Akka Cluster in Maven

2015-07-17 Thread Harit Himanshu
Were you able to do this? Can you provide some guidance on how to do it? On Sunday, May 4, 2014 at 9:32:49 AM UTC-7, Eugene Dzhurinsky wrote: Hello! I've read about the testing with *akka-multi-node-testkit*, however the project I'm working on is based on Maven3. As far as I know, there's

[akka-user] akka-http/spray REST API documentation?

2015-07-10 Thread Harit Himanshu
you + Harit Himanshu -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups

Re: [akka-user] No configuration setting found for key 'akka.version'

2015-06-28 Thread Harit Himanshu
I used maven-shade plugin and then it worked On Wed, Jun 24, 2015 at 5:06 AM, Patrik Nordwall patrik.nordw...@gmail.com wrote: Are you assembling the jar files into one fat jar? /Patrik On Tue, Jun 23, 2015 at 6:15 PM, Harit Himanshu harit.subscripti...@gmail.com wrote: Hello there! I

Re: [akka-user] No configuration setting found for key 'akka.version'

2015-06-28 Thread Harit Himanshu
http://typesafe.com On 29 June 2015 at 00:25:13, Harit Himanshu (harit.subscripti...@gmail.com) wrote: I used maven-shade plugin and then it worked On Wed, Jun 24, 2015 at 5:06 AM, Patrik Nordwall patrik.nordw...@gmail.com wrote: Are you assembling the jar files into one fat jar? /Patrik

[akka-user] Akka multi-jvm, multi-node tests using maven?

2015-06-25 Thread Harit Himanshu
Hello there! I am learning how to test remote actors in action and found the following http://doc.akka.io/docs/akka/2.3.10/dev/multi-jvm-testing.html http://doc.akka.io/docs/akka/2.3.11/dev/multi-node-testing.html But they are talking that using sbt, you run these commands to run your tests.

Re: [akka-user] Akka multi-jvm, multi-node tests using maven?

2015-06-25 Thread Harit Himanshu
, the sources are available: https://github.com/sbt/sbt-multi-jvm Otherwise - sbt is really awesome once you get used to it :-) -- Cheers, Konrad 'ktoso’ Malawski Akka http://akka.io @ Typesafe http://typesafe.com On 25 June 2015 at 23:14:20, Harit Himanshu (harit.subscripti...@gmail.com

Re: [akka-user] Akka multi-jvm, multi-node tests using maven?

2015-06-25 Thread Harit Himanshu
@ Typesafe http://typesafe.com On 25 June 2015 at 23:25:38, Harit Himanshu (harit.subscripti...@gmail.com) wrote: Thanks Konrad, but I got confused, let me see if I understand 1. https://github.com/sbt/sbt-multi-jvmsbt-multi-jvm https://github.com/sbt/sbt-multi-jvm is a sbt plugin

[akka-user] akka remote actor running on local actor

2015-06-23 Thread Harit Himanshu
I am learning `akka-remote` and trying to re-do http://www.typesafe.com/activator/template/akka-sample-remote-scala myself. When I try to run the project in two separate JVMs, I see $ clear;java -jar akkaio-remote/target/akka-remote-jar-with-dependencies.jar

[akka-user] Akka Remoting Separate JVMs: Restarting ChildActor when JVM crashed?

2015-06-22 Thread Harit Himanshu
(where Child Actor lived) crashed? Thank you + Harit Himanshu -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because

[akka-user] How to start Actor in separate JVM on same machine?

2015-06-16 Thread Harit Himanshu
Hello there! Here is the current situation. I have a ActorSystem which has multiple actors - Monitoring, Scheduling, Processing. It starts all of them in single JVM. During one of the design reviews, I was told that Processing may consume lot of memory and may throw OutOfMemoryException,

Re: [akka-user] Could not get the underlyingActor for TestActorRef

2015-06-04 Thread Harit Himanshu
/akka/akka/blob/8485cd2ebb46d2fba851c41c03e34436e498c005/akka-testkit/src/main/scala/akka/testkit/TestActorRef.scala#L130 that accepts a code thunk that returns a new instance of your actor: val runner = TestActorRef(new Runner(new Marathon)) On Mon, Jun 1, 2015 at 7:13 AM, Harit Himanshu

[akka-user] How to test for exception from actor after waiting for some time?

2015-06-02 Thread Harit Himanshu
Hi Here is how my actor works package com.learner.ahka.ruforever import akka.actor.Status.Failure import akka.actor.{Actor, ActorLogging, Props} import akka.event.LoggingReceive import akka.pattern.pipe object Runner { def props(race: Race) = Props(classOf[Runner], race) } class

[akka-user] [Solved] Re: How to test for exception from actor after waiting for some time?

2015-06-02 Thread Harit Himanshu
) expectTerminated(runnerRef, 10 millis) }} class DummySupervisor extends Coach { override def supervisorStrategy: SupervisorStrategy = OneForOneStrategy() { case _: RuntimeException = stop }} On Tuesday, June 2, 2015 at 11:01:47 AM UTC-7, Harit Himanshu wrote: Hi Here is how my actor works

Re: [akka-user] Scala and Akka with Java 7?

2015-06-01 Thread Harit Himanshu
your Akka questions answered on akka-user, no worries. Since it's a community forum it may take some time but we never leave questions unanswered. Thanks in advance! -- Cheers, Konrad 'ktoso’ Malawski Akka http://akka.io @ Typesafe http://typesafe.com On 1 June 2015 at 21:51:39, Harit

Re: [akka-user] Scala and Akka with Java 7?

2015-06-01 Thread Harit Himanshu
so as I understand Scala 2.11.6 and Akks 2.3.11 are good enough to use with Java 7? Right? Thanks a lot + Harit Himanshu On Monday, June 1, 2015 at 1:05:40 PM UTC-7, Konrad Malawski wrote: All APIs in Akka 2.3.x support Java 6 / 7 - only the lambda things require Java 8, so it's easy

Re: [akka-user] Scala and Akka with Java 7?

2015-06-01 Thread Harit Himanshu
Akka http://akka.io @ Typesafe http://typesafe.com On 2 June 2015 at 00:29:13, Harit Himanshu (harit.sub...@gmail.com javascript:) wrote: so as I understand Scala 2.11.6 and Akks 2.3.11 are good enough to use with Java 7? Right? Thanks a lot + Harit Himanshu On Monday, June 1, 2015

Re: [akka-user] [Recommendations]: Migrating one Big Java Application to Akka

2015-05-31 Thread Harit Himanshu
on. Thanks a lot again + Harit Himanshu On Sun, May 31, 2015 at 2:17 PM, Konrad Malawski kt...@typesafe.com wrote: Hi Harit, Allow me to respond in-line to sentences where I have something to say: 1. As deployed on client’s box it’s not trivial to know if its is up and running

Re: [akka-user] is it a good way to initialize Actor?

2015-05-31 Thread Harit Himanshu
I realized that the problem is with executing Future restarting Actor. I made another question in the spirit of isolating problems and is described in full detail here https://groups.google.com/d/msg/akka-user/P_vMC74ZfGY/YR3PzG4PoOsJ Thank you + Harit Himanshu On Friday, May 29, 2015 at 9

Re: [akka-user] is it a good way to initialize Actor?

2015-05-31 Thread Harit Himanshu
in the Actor, and cause supervision to kick in. Hope this helps. I'd again recommend having a look at our proof-of-concent support offer, we could get really in depth and help you out much more then. On Sun, May 31, 2015 at 12:06 AM, Harit Himanshu harit.subscripti...@gmail.com wrote: I

[akka-user] Sending message from Supervisor to Actor(after actor restarts)?

2015-05-30 Thread Harit Himanshu
Requirement? - There has to be a long running process(daemon) that should run forever - In case of any exceptions, it should be restarted, but if it fails again twice, no restart efforts should be taken Problem I face? - The actor is restarted but no message sent again - As you can see,

Re: [akka-user] is it a good way to initialize Actor?

2015-05-30 Thread Harit Himanshu
) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Thank you very much On Fri, May 29, 2015 at 9:46 PM, Harit Himanshu harit.subscripti...@gmail.com wrote: Considering the following Scenario

[akka-user] Future not executed when Restarted Actor receives message

2015-05-30 Thread Harit Himanshu
Hey there! This is what I am trying to do - Have a Supervisor monitor an Actor. The Actor should run forever and be restarted if fails object Coach { def props(): Props = Props[Coach]; } class Coach() extends Actor with ActorLogging { val runner = context.actorOf(Runner.props(new

Re: [akka-user] is it a good way to initialize Actor?

2015-05-29 Thread Harit Himanshu
values in thread locals and may not work as you'd expect it to with multithreaded code. Unless that has changed I'd recommend against mixing mockito with Actor tests. On Wed, May 27, 2015 at 11:48 PM, Harit Himanshu harit.subscripti...@gmail.com wrote: I need to run a static method on a Java

Re: [akka-user] is it a good way to initialize Actor?

2015-05-29 Thread Harit Himanshu
By that do you mean that the main() is never returning? If so, then you're blocking the Actor and wasting an entire thread. Spawn this off on a dedicated dispatcher instead (see dispatchers and futures docs). Yes, this is suppose to run always, and even if it fails, it needs to restart, which is

[akka-user] Re: Testing Akka Actors using mocks

2015-05-27 Thread Harit Himanshu
adds value to our project and gives us ways to add fault tolerance to our application. Does that makes sense? Thanks On Tuesday, May 26, 2015 at 3:56:16 PM UTC-7, Harit Himanshu wrote: I am new to entire ecosystem including `Scala`, `Akka` and `ScalaTest` I am working on a problem where my

[akka-user] is it a good way to initialize Actor?

2015-05-27 Thread Harit Himanshu
I need to run a static method on a Java class (provided as a jar dependency). I also wanted to be able to write test on that. I created a wrapper class in Scala that will call this method. It looks like object CurrentLogProcessor { } class CurrentLogProcessor { def run: Unit =

[akka-user] Re: Testing Akka Actors using mocks

2015-05-26 Thread Harit Himanshu
26, 2015 at 6:13:05 PM UTC-7, bearrito wrote: Split your processing from the actor portion. Use a trait or pass the processor in using DI. On Tuesday, May 26, 2015 at 6:56:16 PM UTC-4, Harit Himanshu wrote: I am new to entire ecosystem including `Scala`, `Akka` and `ScalaTest` I am

[akka-user] Testing Akka Actors using mocks

2015-05-26 Thread Harit Himanshu
I am new to entire ecosystem including `Scala`, `Akka` and `ScalaTest` I am working on a problem where my `Actor` gives call to external system. case object LogProcessRequest class LProcessor extends Actor { val log = Logging(context.system, this) def receive = {

[akka-user] How could actor know if it has all the responses it needs in order to proceed?

2015-05-25 Thread Harit Himanshu
I am fairly new to akka and not sure about approaching this problem. - I have a `Monitor` actor that spawns 2 other actors as `DiskMonitor` and `MemoryMonitor` - DiskMonitor checks the diskUsage and report DiskReport message - MemoryMonitor checks the diskUsage and report MemoryReport message

[akka-user] [Recommendations]: Migrating one Big Java Application to Akka

2015-05-21 Thread Harit Himanshu
is worthless or I have enough ideas to make an informed decision. Please enlighten! Thank you + Harit Himanshu -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group

Re: [akka-user] Parallel File Processing with Akka Actors?

2015-05-08 Thread Harit Himanshu
recommendation differ based on this information? Thank you + Harit Himanshu On Thursday, May 7, 2015 at 11:44:04 PM UTC-7, Idar Borlaug wrote: What filesystem and disks are you reading the files from? Reading a file in one actor is a good idea, because you can read it sequentially. Reading from 10

Re: [akka-user] Parallel File Processing with Akka Actors?

2015-05-08 Thread Harit Himanshu
-RC2/ It has all you need. There are also activator tutorials: http://www.typesafe.com/activator/template/akka-stream-java8 http://www.typesafe.com/activator/template/akka-stream-scala -Endre On Fri, May 8, 2015 at 2:23 AM, Harit Himanshu harit.sub...@gmail.com javascript: wrote

[akka-user] Parallel File Processing with Akka Actors?

2015-05-07 Thread Harit Himanshu
Hello This is what my use case looks like *Use Case* - Given many log files in range (2MB - 2GB), I need to parse each of these logs and apply some processing, generate Java POJO. - For this problem, lets assume that we have just 1 log file - Also, the idea is to making best use of System.

Re: [akka-user] akka.testkit.TestEventListener works only in application.conf and not in another configurations?

2015-05-05 Thread Harit Himanshu
explicitly (as an argument to the factory method). -Endre On Sun, May 3, 2015 at 5:15 AM, Harit Himanshu harit.subscripti...@gmail.com wrote: As per docs http://doc.akka.io/docs/akka/snapshot/java/testing.html#akka-testkit, under (Expecting Log Messages) ote Be sure to exchange the default

Re: [akka-user] [BUG?] Could not start logger due to [akka.ConfigurationException: Logger specified in config can't be loaded [akka.testkit.TestEventListener]

2015-05-04 Thread Harit Himanshu
I could not make it work. Thanks + Harit Himanshu On Mon, May 4, 2015 at 1:57 AM, Akka Team akka.offic...@gmail.com wrote: On Sun, May 3, 2015 at 5:49 PM, Harit Himanshu harit.subscripti...@gmail.com wrote: As per docs http://doc.akka.io/docs/akka/snapshot/java/testing.html#akka-testkit

Re: [akka-user] Java dependency injection with Java EE?

2015-05-04 Thread Harit Himanshu
, this post contains some pointers: http://letitcrash.com/post/55958814293/akka-dependency-injection -Endre On Sat, Apr 25, 2015 at 5:52 PM, Harit Himanshu harit.sub...@gmail.com wrote: Hello I am learning Akka and immediately one question popped up in my mind. I use Java EE https

[akka-user] [BUG?] Could not start logger due to [akka.ConfigurationException: Logger specified in config can't be loaded [akka.testkit.TestEventListener]

2015-05-03 Thread Harit Himanshu
As per docs http://doc.akka.io/docs/akka/snapshot/java/testing.html#akka-testkit, under (Expecting Log Messages), Be sure to exchange the default logger with the TestEventListener in your application.conf to enable this function: akka.loggers = [akka.testkit.TestEventListener] So, this

[akka-user] Testing Supervisor Strategies

2015-05-02 Thread Harit Himanshu
I am very new to `Akka` and using `Java` to program my system. **Problem definition** - I have a `TenantMonitor` which when receives `TenantMonitorMessage()`, starts a new actor `DiskMonitorActor`. - The `DiskMonitorActor` may fail for various reasons and may throw `DiskException`. The

[akka-user] Re: Testing Supervisor Strategies

2015-05-02 Thread Harit Himanshu
()); testProbeDiskMonitor.expectMsgClass(Terminated.class); }}; } Are there better ways? Thoughts? On Saturday, May 2, 2015 at 1:50:49 PM UTC-7, Harit Himanshu wrote: I am very new to `Akka` and using `Java` to program my system. **Problem definition** - I have a `TenantMonitor` which when receives

[akka-user] akka.testkit.TestEventListener works only in application.conf and not in another configurations?

2015-05-02 Thread Harit Himanshu
application.conf akka { loggers = [akka.testkit.TestEventListener] } But now when I run my test, they fail, even if in my test I can print that this Logger is present SimpleConfigList([akka.testkit.TestEventListener]) What's wrong with my approach? Thanks + Harit Himanshu -- Read the docs

[akka-user] Beginner: Supervisor not receiving exception thrown

2015-05-01 Thread Harit Himanshu
This is how my Supervisor looks public class TenantMonitorActor extends UntypedActor { public static final String NAME = tenantDiskMonitor; private static final String assetsLocationKey = tenant.assetsLocation; private static final String schedulerKey =

Re: [akka-user] What happens to unhandled(message)?

2015-04-27 Thread Harit Himanshu
Thanks a lot. This is ver helpful. I was curious to see if I can still see unhandled messages On Mon, Apr 27, 2015 at 3:04 AM, Konrad Malawski kt...@typesafe.com wrote: Excellent answer Adam. An interesting point to add here is that when using Scala there is no need to call unhandled()

[akka-user] What happens to unhandled(message)?

2015-04-25 Thread Harit Himanshu
If an Actor does not handle a message is executes unhanded(message) as if (message instanceof DiskMonitorMessage) { // do something } else { unhandled(message); } - What happens now? where does this message go? - Does it stays in Actor's mailbox? What if Actor never changes behavior (no

[akka-user] Java dependency injection with Java EE?

2015-04-25 Thread Harit Himanshu
different properties (*.properties) which are usually part of src/main/resources I was wondering how these mechanism are achieved in Akka or if Java EE and Akka play well together. Thoughts? Thanks a lot + Harit Himanshu -- Read the docs: http://akka.io/docs/ Check the FAQ: http