You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by helander <le...@gmail.com> on 2012/07/24 10:39:36 UTC

camel-nmr for camel 2.10

Where can I find a version of the *camel-nmr* component that works with camel
*2.10*?

I need to communicate between contexts in different osgi bundles (using
Karaf). I tried to use the *camel-context* component, but it does not seem
that it works between contexts in different bundles, correct?

So my next step was to try camel-nmr in order to be able to "pass the bundle
borders".

Are there any other solutions to this problem?


/Lars



--
View this message in context: http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-nmr for camel 2.10

Posted by Christian Müller <ch...@gmail.com>.
All Camel components are designed to run in an OSGI environment.
The cool think with direct-vm is it use the same thread which means both
routes can share the same transaction context (which is not the case with
vm).

Best,
Christian

On Wed, Jul 25, 2012 at 11:43 PM, helander <le...@gmail.com> wrote:

> Ok, thanks.
>
> The description of *vm* does not state anything about being able to use in
> an osgi container, while the *direct-vm* page is very explicit about this.
> My interpretation was that *vm* did not support crossing bundle boundaries.
> Whatever the capability is for *vm*, maybe it woul be nice to make that
> explicit on the *vm page*.
>
> I will try out *vm *as well.
>
> Thanks
>
> Lars
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383p5716488.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: camel-nmr for camel 2.10

Posted by helander <le...@gmail.com>.
Ok, thanks.

The description of *vm* does not state anything about being able to use in
an osgi container, while the *direct-vm* page is very explicit about this.
My interpretation was that *vm* did not support crossing bundle boundaries.
Whatever the capability is for *vm*, maybe it woul be nice to make that
explicit on the *vm page*.

I will try out *vm *as well.

Thanks

Lars



--
View this message in context: http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383p5716488.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-nmr for camel 2.10

Posted by Christian Müller <ch...@gmail.com>.
There is also a synchronous vm component [1].
However, using asynchronous routing has nothing to do with the message
exchange pattern (MEP), e.g. request/reply. Asynchronous means the request
is processed in a separate thread. If you use the inOut MEP
(request/reply), Camel will take care of correlating the request and
response. Try it out!

[1] http://camel.apache.org/direct-vm.html

Best,
Christian

On Wed, Jul 25, 2012 at 2:39 AM, helander <le...@gmail.com> wrote:

> When reading about the vm component it is described to be asynchronous, so
> it would not fit the request/reply case. Unless you build two separate
> "paths", one for request and one for reply. Or did I miss something?
>
> /Lars
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383p5716432.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: camel-nmr for camel 2.10

Posted by helander <le...@gmail.com>.
When reading about the vm component it is described to be asynchronous, so 
it would not fit the request/reply case. Unless you build two separate
"paths", one for request and one for reply. Or did I miss something?

/Lars



--
View this message in context: http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383p5716432.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-nmr for camel 2.10

Posted by Christian Müller <ch...@gmail.com>.
If you use request/reply, try the vm component.
I would be surprised, if this is not the fastest solution...

Apache ServiceMix takes care of it, which version of Karaf, Camel, CXF,
ActiveMQ, ... works together. If you "only" use Karaf, it's your
responsibility to figure it out.

Best,
Christian

On Tue, Jul 24, 2012 at 9:25 PM, helander <le...@gmail.com> wrote:

> I got camel-nmr to work, but performance was not very good.
>
> WS Client -> HTTP Service -> CXF Endpoint -> NMR send -> NMR receive  (and
> back to WS Client)
>
>  this takes about 100 ms
>
>
> WS Client -> HTTP Service -> CXF Endpoint  (and back to WS Client)
>
>   this takes about 10 ms
>
> So crossing the bundle border using NMR gives significant overhead.
>
>
> /Lars
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383p5716428.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: camel-nmr for camel 2.10

Posted by helander <le...@gmail.com>.
I got camel-nmr to work, but performance was not very good.

WS Client -> HTTP Service -> CXF Endpoint -> NMR send -> NMR receive  (and
back to WS Client) 

 this takes about 100 ms


WS Client -> HTTP Service -> CXF Endpoint  (and back to WS Client)

  this takes about 10 ms

So crossing the bundle border using NMR gives significant overhead.


/Lars



--
View this message in context: http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383p5716428.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-nmr for camel 2.10

Posted by helander <le...@gmail.com>.
Thanks Christian,

I need InOut and I do want to avoid serialization/deserialization (for
performance reasons), and then the only option left is NMR, if I have
understood things correctly.

I will try to use camel-nmr from servicemix 4.4.2, and hope that it works
with camel 2.10.0 and Karaf 2.2.8 .
How do you know what versions of what "components" (camel, smx-nmr, karaf,
...) that are compatible?

/Lars



--
View this message in context: http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383p5716426.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-nmr for camel 2.10

Posted by Christian Müller <ch...@gmail.com>.
You have a number of choices: [1], [2], [3], [4] or [5] are the common ones.
But there are also fancy ones. Checkout [6] to get an overview on our
components...

Because camel-nmr is provided bei ServiceMix (as documented on the
component page), there is no version 2.10.0. The latest one is 4.4.2 [7]

[1] http://camel.apache.org/direct-vm.html
[2] http://camel.apache.org/vm.html
[3] http://camel.apache.org/jms.html
[4] http://camel.apache.org/activemq.html
[5] http://camel.apache.org/nmr.html
[6] http://camel.apache.org/components.html
[7]
http://search.maven.org/#artifactdetails|org.apache.servicemix.examples|camel-nmr|4.4.2|bundle

Best,
Christian

On Tue, Jul 24, 2012 at 10:39 AM, helander <le...@gmail.com> wrote:

> Where can I find a version of the *camel-nmr* component that works with
> camel
> *2.10*?
>
> I need to communicate between contexts in different osgi bundles (using
> Karaf). I tried to use the *camel-context* component, but it does not seem
> that it works between contexts in different bundles, correct?
>
> So my next step was to try camel-nmr in order to be able to "pass the
> bundle
> borders".
>
> Are there any other solutions to this problem?
>
>
> /Lars
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-nmr-for-camel-2-10-tp5716383.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>