You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Kevin k <ke...@gmail.com> on 2008/02/06 17:19:52 UTC

properties when using camel in service mix

I am using Servicemix 3.2.1

I made a simple camel pipeline, In MyRouteBuild.java, it looks like this:
          from("jbi:service:...pipeline")
                .to("jbi:endpoint:...endpoint1",
                   "jbi:endpoint:...endpoint2",
                   "jbi:endpoint:...endpoint3"
                );


In my first endpoint, I do a MessageExchange.setProperty on several things
that the second and third endpoints will want to use.

These properties do not seem to show up in the other components.

(I tried it using an eip pipeline and things work fine, but I would rather
use camel if possible).

Is this a limitation of the camel servicemix component?
Do I need to do something to "turn on" property copying?
Am I configuring camel wrong?


Thanks for you help.
-Kevin


-- 
View this message in context: http://www.nabble.com/properties-when-using-camel-in-service-mix-tp15306687s12049p15306687.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: properties when using camel in service mix

Posted by Chris Custine <cc...@apache.org>.
The to("ep1", "ep2", "ep3") syntax does a static recipient list so the same
message goes to all 3 recipients.  Try this instead:

from("jbi:service:...pipeline")
    .pipeline("jbi:endpoint:...endpoint1",
                  "jbi:endpoint:...endpoint2",
                  "jbi:endpoint:...endpoint3"
                 );

more docs here: http://activemq.apache.org/camel/pipes-and-filters.html

Thanks,
Chris

On Feb 6, 2008 9:19 AM, Kevin k <ke...@gmail.com> wrote:

>
> I am using Servicemix 3.2.1
>
> I made a simple camel pipeline, In MyRouteBuild.java, it looks like this:
>          from("jbi:service:...pipeline")
>                .to("jbi:endpoint:...endpoint1",
>                   "jbi:endpoint:...endpoint2",
>                   "jbi:endpoint:...endpoint3"
>                );
>
>
> In my first endpoint, I do a MessageExchange.setProperty on several things
> that the second and third endpoints will want to use.
>
> These properties do not seem to show up in the other components.
>
> (I tried it using an eip pipeline and things work fine, but I would rather
> use camel if possible).
>
> Is this a limitation of the camel servicemix component?
> Do I need to do something to "turn on" property copying?
> Am I configuring camel wrong?
>
>
> Thanks for you help.
> -Kevin
>
>
> --
> View this message in context:
> http://www.nabble.com/properties-when-using-camel-in-service-mix-tp15306687s12049p15306687.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: properties when using camel in service mix

Posted by Gert Vanthienen <ge...@skynet.be>.
Kevin,

First of all, did you try Chris' suggestion on specifying the route as
    from("jbi:service:...pipeline").pipeline("jbi:...endpoint1", ...);?

Could you give that a try first?  If it still doesn't work, the message 
properties probably aren't being copied properly when moving back and 
forth to the JBI NMR.  In that case, the best way to get it addressed is 
by raising a JIRA for this issue.

Gert



Kevin k wrote:
> I am using Servicemix 3.2.1
>
> I made a simple camel pipeline, In MyRouteBuild.java, it looks like this:
>           from("jbi:service:...pipeline")
>                 .to("jbi:endpoint:...endpoint1",
>                    "jbi:endpoint:...endpoint2",
>                    "jbi:endpoint:...endpoint3"
>                 );
>
>
> In my first endpoint, I do a MessageExchange.setProperty on several things
> that the second and third endpoints will want to use.
>
> These properties do not seem to show up in the other components.
>
> (I tried it using an eip pipeline and things work fine, but I would rather
> use camel if possible).
>
> Is this a limitation of the camel servicemix component?
> Do I need to do something to "turn on" property copying?
> Am I configuring camel wrong?
>
>
> Thanks for you help.
> -Kevin
>
>
>   


Re: properties when using canel in service mix

Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Mar 3, 2008 at 6:56 AM, Kevin k <ke...@gmail.com> wrote:
>
>
>  bsnyder wrote:
>  >
>  > Where exactly are you calling MessageExchange.setProperty()? I know
>  > that there are some spots where properties are not copied correctly
>  > and I'd like to get those fixed. So you're using the servicemix-eip
>  > component and the Pipeline pattern?
>  >
>  > Bruce
>  >
>
>  Bruce,
>  I am using the camel pipeline, not an eip pipeline.
>  I am calling exchange.setProperty inside of the first endpoint in the
>  pipeline (it's a simple bean endpoint).
>
>  I did post a patch to jira, but as far as I know it's not been accepted yet.

Oh OK. I see the patch here:

https://issues.apache.org/activemq/browse/SM-1219

I've added a comment about how to correct the diff. Please post a new
diff so that we can commit it.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: properties when using canel in service mix

Posted by Kevin k <ke...@gmail.com>.

bsnyder wrote:
> 
> Where exactly are you calling MessageExchange.setProperty()? I know
> that there are some spots where properties are not copied correctly
> and I'd like to get those fixed. So you're using the servicemix-eip
> component and the Pipeline pattern?
> 
> Bruce
> 

Bruce,
I am using the camel pipeline, not an eip pipeline.
I am calling exchange.setProperty inside of the first endpoint in the
pipeline (it's a simple bean endpoint).

I did post a patch to jira, but as far as I know it's not been accepted yet.

-Thanks
-Kevin
-- 
View this message in context: http://www.nabble.com/properties-when-using-camel-in-service-mix-tp15306687s12049p15804408.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: properties when using canel in service mix

Posted by Bruce Snyder <br...@gmail.com>.
On Wed, Feb 6, 2008 at 7:41 AM, Kevin k <ke...@gmail.com> wrote:
>
>  I am using Servicemix 3.2.1
>
>  I made a simple camel pipeline, In MyRouteBuild.java, it looks like this:
>           from("jbi:service:...pipeline")
>                 .to("jbi:endpoint:...endpoint1",
>                    "jbi:endpoint:...endpoint2",
>                    "jbi:endpoint:...endpoint3"
>                 );
>
>
>  In my first endpoint, I do a MessageExchange.setProperty on several things
>  that the second and third endpoints will want to use.
>
>  These properties do not seem to show up in the other components.
>
>  (I tried it using an eip pipeline and things work fine, but I would rather
>  use camel if possible).
>
>  Is this a limitation of the camel servicemix component?
>  Do I need to do something to "turn on" property coping?
>  Am I configuring camel wrong?

Where exactly are you calling MessageExchange.setProperty()? I know
that there are some spots where properties are not copied correctly
and I'd like to get those fixed. So you're using the servicemix-eip
component and the Pipeline pattern?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: properties when using camel in service mix

Posted by Chris Custine <cc...@apache.org>.
Sorry Kevin, I am processing emails in chronological order and just saw your
Jira issue.  Thanks!

On Feb 7, 2008 11:06 AM, Chris Custine <cc...@apache.org> wrote:

> Ahhh yeah, it does sound like there is a problem copying properties if
> pipeline did not work.  Please do file a Jira if this doesn't work and I
> will try to add some tests to the Camel BC to expose this as well.
>
> Thanks,
> Chris
>
>
> On Feb 7, 2008 8:13 AM, Kevin k <ke...@gmail.com> wrote:
>
> >
> > Chris,
> > Thanks for you reply.
> > I change it to a pipeline but still got the same results.
> > I tried setting a property on everything I could find (the exchange, the
> > in
> > message and the out message), but nothing seems to get copied over.
> >
> > Gert,
> > I will mess around with it a little more, then most likely enter a JIRA
> > ticket.
> >
> > Thanks for your help.
> > -Kevin
> >
> > --
> > View this message in context:
> > http://www.nabble.com/properties-when-using-camel-in-service-mix-tp15306687s12049p15335810.html
> > Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >
> >
>

Re: properties when using camel in service mix

Posted by Chris Custine <cc...@apache.org>.
Ahhh yeah, it does sound like there is a problem copying properties if
pipeline did not work.  Please do file a Jira if this doesn't work and I
will try to add some tests to the Camel BC to expose this as well.

Thanks,
Chris

On Feb 7, 2008 8:13 AM, Kevin k <ke...@gmail.com> wrote:

>
> Chris,
> Thanks for you reply.
> I change it to a pipeline but still got the same results.
> I tried setting a property on everything I could find (the exchange, the
> in
> message and the out message), but nothing seems to get copied over.
>
> Gert,
> I will mess around with it a little more, then most likely enter a JIRA
> ticket.
>
> Thanks for your help.
> -Kevin
>
> --
> View this message in context:
> http://www.nabble.com/properties-when-using-camel-in-service-mix-tp15306687s12049p15335810.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: properties when using camel in service mix

Posted by Kevin k <ke...@gmail.com>.
Chris,
Thanks for you reply.
I change it to a pipeline but still got the same results.
I tried setting a property on everything I could find (the exchange, the in
message and the out message), but nothing seems to get copied over.

Gert,
I will mess around with it a little more, then most likely enter a JIRA
ticket.

Thanks for your help.
-Kevin

-- 
View this message in context: http://www.nabble.com/properties-when-using-camel-in-service-mix-tp15306687s12049p15335810.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.