Fixed the problem - 
The solution to my problem was in this link that I stumbled upon - 
http://stackoverflow.com/questions/17415076/akka-camel-untypedconsumeractor-not-consuming-from-file-based-queue

I was not calling the super.preStart in my code.

thanks!


On Sunday, August 17, 2014 7:58:17 PM UTC+5:30, Gaurav Sharma wrote:
>
> Hi,
> I'm trying to create a node that creates a UntypedConsumer that would read 
> through a file location. I have everything configured in Karaf and not 
> getting any error but still I'm not able to see my file being moved...
>
> The akka version i'm using is 2.3.4 and I have all of it loaded in my 
> karaf 
> [  54] [Active     ] [            ] [   80] com.typesafe.akka.actor (2.3.4)
> [  55] [Active     ] [            ] [   80] Scala Compiler 
> (2.10.0.v20121205-112020-VFINAL-18481cef9b)
> [  56] [Active     ] [            ] [   80] Scala Standard Library 
> (2.10.0.v20121205-112020-VFINAL-18481cef9b)
> [  57] [Active     ] [            ] [   80] Scala Reflect 
> (2.10.0.v20121205-112020-VFINAL-18481cef9b)
> [  58] [Active     ] [            ] [   80] com.typesafe.config (1.2.1)
> [  59] [Active     ] [            ] [   80] com.typesafe.akka.osgi (2.3.4)
> [  60] [Active     ] [            ] [   80] com.typesafe.akka.camel (2.3.4)
> [  61] [Active     ] [            ] [   80] camel-core (2.13.2)
> [  62] [Active     ] [            ] [   80] com.typesafe.akka.cluster 
> (2.3.4)
> [  63] [Active     ] [            ] [   80] Protocol Buffer Java API 
> (2.5.0)
> [  64] [Active     ] [            ] [   80] 
> wrap_file____home_exyybcc_Downloads_jars_uncommons-maths-1.2.2.jar (0)
> [  65] [Active     ] [            ] [   80] com.typesafe.akka.remote 
> (2.3.4)
> [  66] [Active     ] [            ] [   80] The Netty Project (3.8.0.Final)
> [  69] [Active     ] [            ] [   80] osgi.cmpn (5.0.0.201305092017)
> [  77] [Active     ] [            ] [   80] Apache Felix Declarative 
> Services (1.8.2)
> [  80] [Active     ] [            ] [   80] com.typesafe.akka.slf4j (2.3.4)
>
>
>
>
> Below is what I'm trying to do - 
>
> Node initialization code -
> config = ConfigFactory
> .parseString("akka.remote.netty.tcp.port=" + 2551)
> .withFallback(
> ConfigFactory
> .parseString("akka.cluster.roles = [" +NodeConstants.FILE_CONSUMER_ROLE 
> +"]"))
> .withFallback(ConfigFactory.load());
>
> ClassLoader loader = OsgiActorSystemFactory.akkaActorClassLoader();
> Option<ClassLoader> option = Option.apply(loader);
> BundleContext bContext = 
> FrameworkUtil.getBundle(this.getClass()).getBundleContext();
> OsgiActorSystemFactory factory = new OsgiActorSystemFactory(bContext, 
> option, config);
>  actorSystem = factory.createActorSystem("ClusterSystem");
> actorSystem.actorOf(Props.create(FileRouteConsumerActor.class), 
> "fileConsumerActor");
>
> application.conf
> akka {
> version = "2.3.4"
> event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] 
>       loggers = ["akka.event.slf4j.Slf4jLogger"]
>       loglevel = "DEBUG"
>
>   actor {
>     provider = "akka.cluster.ClusterActorRefProvider"
>   }
>   remote {
>     log-remote-lifecycle-events = off
>     netty.tcp {
>       hostname = "127.0.0.1"
>       port = 0
>     }
>   }
>
> cluster {
>     seed-nodes = [
>       "akka.tcp://ClusterSystem@127.0.0.1:2551",
>       "akka.tcp://ClusterSystem@127.0.0.1:2552"]
>
>     auto-down-unreachable-after = 10s
>   }
>
> file consumer actor code -
> public String getEndpointUri() {
> // return "jetty:http://0.0.0.0:8877/camel/welcome";;
> System.out.println("Inside Endopoint URI FileConsumer");
> return "file:/home/exyybcc/temp?move=/home/exyybcc/temp/pmed";
> }
>
> public void onReceive(Object message) {
> if ((message instanceof CamelMessage)
>            and all the other code
>           }
>
>
>
> Now I'm no0t clear I have two files in the end point path but it is not 
> working. Please can anyone help me in knowing as to why this is not working.
>
> thanks!
>
>
>
>
>

-- 
>>>>>>>>>>      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 "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to