Hi Igmar,

On Tue, Apr 21, 2015 at 12:48 PM, Igmar Palsenberg <[email protected]>
wrote:

> Hi,
>
> I've got an app that uses akka-camel. In the bootstrap code, I need to
> wait for the Camel actor to become ready. If I don't, messages will come in
> to soon, and they get lost.
> According to the docs, I need to do :
>
> ActorRef actorRef = system.actorOf(p, "portal");
> p = Props.create(DCSConsumerDI.class, injector);
>
> Timeout timeout = new Timeout(Duration.create(5, SECONDS));
>   Future<ActorRef> f = camel.activationFutureFor(actorRef, timeout,
> system.dispatcher());
>   try {
>     Await.result(f, timeout.duration());
>   } catch (Exception e) {
>   }
>
> While it works for my purpose, it always times out (and goes to the catch
> block), and I get a dead letter notification.
>

Is this code above inside an actor? If so, can there be a deadlock involved
by blocking the actor and therefore not receiving messages until the
timeout? What is the dead letter you get?

I think a small, self-contained reproducer could help here.

-Endre


> What am I missing here ? In my case, I just want to wait until the Camel
> routes have been added, and the actor is ready to receive messages.
>
> If someone can share some pointers, that would be appreciated.
>
>
> Regards,
>
>
> Igmar
>
>
>  --
> >>>>>>>>>> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      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 [email protected].
To post to this group, send email to [email protected].
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