You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by umang <um...@gmail.com> on 2015/05/23 09:07:36 UTC

Camel Thread Id changing when calling http component

My route is like this:

from(rabbitmq).
to(redisLockerProcessor).
to(processor1).
to(ahc://http:).to(processor2)
.to(redisLockReleaseProcessor)


I am using redisson library which stores thread id which took the lock in
redis. But in redisLockReleaseProcessor it is throwing exception that thread
id is not same as thread id which took the lock. How does http components
thread work in camel? I though the whole route runs in same thread. How can
we solve the redis problem here if the whole route doesn't run in same
thread?



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Thread-Id-changing-when-calling-http-component-tp5767435.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Thread Id changing when calling http component

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Use synchronous=true on the ahc endpoint

Den lørdag den 23. maj 2015 skrev umang <um...@gmail.com>:

> My route is like this:
>
> from(rabbitmq).
> to(redisLockerProcessor).
> to(processor1).
> to(ahc://http:).to(processor2)
> .to(redisLockReleaseProcessor)
>
>
> I am using redisson library which stores thread id which took the lock in
> redis. But in redisLockReleaseProcessor it is throwing exception that
> thread
> id is not same as thread id which took the lock. How does http components
> thread work in camel? I though the whole route runs in same thread. How can
> we solve the redis problem here if the whole route doesn't run in same
> thread?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Thread-Id-changing-when-calling-http-component-tp5767435.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/