You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mark Webb <el...@gmail.com> on 2010/10/01 22:37:42 UTC

message not getting delivered

I am sending messages through a Camel route in ActiveMQ.  My message
reaches the end of the processing chain, and at the last processor I
call exchange.setOut( newly created DefaultMessage ).  When I look at
the admin page for ActiveMQ, the topic shows that there is a message
to be dequeued.  It even says that there is a consumer connected to
that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
Consumer.setMessageListener.  So why are the messages not making their
way to my GUI tool?  I am stumped as to why the messages sit in the
topic and never leave if there is a listener for that topic.

Of course the first thought is, is the Connection started?  Yeah I
verified that.  In fact I can send messages to the topic via the
web-based admin tool for ActiveMQ and the GUI receives them.

Thanks for any help you have,
Mark

Re: The semantics of getIn and getOut (was: message not getting delivered)

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Thanks Claus, will do.

I think there's a lot to do to improve documentation and I want to make that one of my priorities. I hope the whole community will join :).

Cheers,
Hadrian


On Oct 8, 2010, at 12:10 PM, Claus Ibsen wrote:

> On Thu, Oct 7, 2010 at 3:51 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:
>> As promised, here's my take [1] on the getIn()/getOut() confusion.
>> In a few days, when the dust will settle I'll take what's relevant from the post, and the comments that will follow and update the wiki page.
>> 
>> I hope that clarifies the issue better,
>> Hadrian
>> 
>> [1] http://camelbot.blogspot.com/2010/10/should-you-getin-or-getout.html
>> 
> 
> Hadrian this is a nice piece of writing you did. Love to see the
> improved documentation at Apache which should be the result of this.
> 
> Remember to update the javadoc on Exchange as well.
> 
> I would also suggest adding some link or info to the FAQ from the
> "Getting Started" guides somewhere, in case the end user starts
> playing with a Processor, and thus gets exposed to the Exchange and
> the question on the getIn and getOut methods.
> 
> 
> 
> 
>> 
>> On Oct 4, 2010, at 3:58 PM, Mark Webb wrote:
>> 
>>> I agree. But when producing an out I think you need to call
>>> Exchange.setIn(Message).  Seems like when you call
>>> Exchange.setOut(Message) you are setting up a request-reply scenario
>>> which is not what I wanted.
>>> 
>>> 
>>> On Mon, Oct 4, 2010 at 1:54 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:
>>>> Yeah, there is still a lot of confusion.
>>>> Unfortunately that page is bollocks and I'll have to get it cleaned up.
>>>> Mark, I think you did the right thing actually, in a processor one should *not* modify the in, but produce an out, if needed. It's time to get that clarified!
>>>> 
>>>> My $0.02,
>>>> Hadrian
>>>> 
>>>> On Oct 4, 2010, at 10:01 AM, Claus Ibsen wrote:
>>>> 
>>>>> On Mon, Oct 4, 2010 at 3:57 PM, Mark Webb <el...@gmail.com> wrote:
>>>>>> Thanks.  I have things working now.
>>>>>> 
>>>>>> It seems weird to me though that if in a Processor I take a message
>>>>>> in, transform it into a newly created Message object that I should
>>>>>> call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
>>>>>> think of a Processor as taking "in" a message and then sending it
>>>>>> "out", but it looks like that is not the case.  Just need to adjust
>>>>>> the way I think about things.
>>>>>> 
>>>>> 
>>>>> You are not the only one. See this FAQ
>>>>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen <cl...@gmail.com> wrote:
>>>>>>> See this FAQ
>>>>>>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>>>>>> 
>>>>>>> On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb <el...@gmail.com> wrote:
>>>>>>>> I am sending messages through a Camel route in ActiveMQ.  My message
>>>>>>>> reaches the end of the processing chain, and at the last processor I
>>>>>>>> call exchange.setOut( newly created DefaultMessage ).  When I look at
>>>>>>>> the admin page for ActiveMQ, the topic shows that there is a message
>>>>>>>> to be dequeued.  It even says that there is a consumer connected to
>>>>>>>> that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
>>>>>>>> Consumer.setMessageListener.  So why are the messages not making their
>>>>>>>> way to my GUI tool?  I am stumped as to why the messages sit in the
>>>>>>>> topic and never leave if there is a listener for that topic.
>>>>>>>> 
>>>>>>>> Of course the first thought is, is the Connection started?  Yeah I
>>>>>>>> verified that.  In fact I can send messages to the topic via the
>>>>>>>> web-based admin tool for ActiveMQ and the GUI receives them.
>>>>>>>> 
>>>>>>>> Thanks for any help you have,
>>>>>>>> Mark
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Claus Ibsen
>>>>>>> Apache Camel Committer
>>>>>>> 
>>>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>>>> Open Source Integration: http://fusesource.com
>>>>>>> Blog: http://davsclaus.blogspot.com/
>>>>>>> Twitter: http://twitter.com/davsclaus
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Claus Ibsen
>>>>> Apache Camel Committer
>>>>> 
>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>> Open Source Integration: http://fusesource.com
>>>>> Blog: http://davsclaus.blogspot.com/
>>>>> Twitter: http://twitter.com/davsclaus
>>>> 
>>>> 
>> 
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus


Re: The semantics of getIn and getOut (was: message not getting delivered)

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Oct 7, 2010 at 3:51 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:
> As promised, here's my take [1] on the getIn()/getOut() confusion.
> In a few days, when the dust will settle I'll take what's relevant from the post, and the comments that will follow and update the wiki page.
>
> I hope that clarifies the issue better,
> Hadrian
>
> [1] http://camelbot.blogspot.com/2010/10/should-you-getin-or-getout.html
>

Hadrian this is a nice piece of writing you did. Love to see the
improved documentation at Apache which should be the result of this.

Remember to update the javadoc on Exchange as well.

I would also suggest adding some link or info to the FAQ from the
"Getting Started" guides somewhere, in case the end user starts
playing with a Processor, and thus gets exposed to the Exchange and
the question on the getIn and getOut methods.




>
> On Oct 4, 2010, at 3:58 PM, Mark Webb wrote:
>
>> I agree. But when producing an out I think you need to call
>> Exchange.setIn(Message).  Seems like when you call
>> Exchange.setOut(Message) you are setting up a request-reply scenario
>> which is not what I wanted.
>>
>>
>> On Mon, Oct 4, 2010 at 1:54 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:
>>> Yeah, there is still a lot of confusion.
>>> Unfortunately that page is bollocks and I'll have to get it cleaned up.
>>> Mark, I think you did the right thing actually, in a processor one should *not* modify the in, but produce an out, if needed. It's time to get that clarified!
>>>
>>> My $0.02,
>>> Hadrian
>>>
>>> On Oct 4, 2010, at 10:01 AM, Claus Ibsen wrote:
>>>
>>>> On Mon, Oct 4, 2010 at 3:57 PM, Mark Webb <el...@gmail.com> wrote:
>>>>> Thanks.  I have things working now.
>>>>>
>>>>> It seems weird to me though that if in a Processor I take a message
>>>>> in, transform it into a newly created Message object that I should
>>>>> call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
>>>>> think of a Processor as taking "in" a message and then sending it
>>>>> "out", but it looks like that is not the case.  Just need to adjust
>>>>> the way I think about things.
>>>>>
>>>>
>>>> You are not the only one. See this FAQ
>>>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>>>
>>>>>
>>>>>
>>>>> On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen <cl...@gmail.com> wrote:
>>>>>> See this FAQ
>>>>>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>>>>>
>>>>>> On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb <el...@gmail.com> wrote:
>>>>>>> I am sending messages through a Camel route in ActiveMQ.  My message
>>>>>>> reaches the end of the processing chain, and at the last processor I
>>>>>>> call exchange.setOut( newly created DefaultMessage ).  When I look at
>>>>>>> the admin page for ActiveMQ, the topic shows that there is a message
>>>>>>> to be dequeued.  It even says that there is a consumer connected to
>>>>>>> that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
>>>>>>> Consumer.setMessageListener.  So why are the messages not making their
>>>>>>> way to my GUI tool?  I am stumped as to why the messages sit in the
>>>>>>> topic and never leave if there is a listener for that topic.
>>>>>>>
>>>>>>> Of course the first thought is, is the Connection started?  Yeah I
>>>>>>> verified that.  In fact I can send messages to the topic via the
>>>>>>> web-based admin tool for ActiveMQ and the GUI receives them.
>>>>>>>
>>>>>>> Thanks for any help you have,
>>>>>>> Mark
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Claus Ibsen
>>>>>> Apache Camel Committer
>>>>>>
>>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>>> Open Source Integration: http://fusesource.com
>>>>>> Blog: http://davsclaus.blogspot.com/
>>>>>> Twitter: http://twitter.com/davsclaus
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> Apache Camel Committer
>>>>
>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>> Open Source Integration: http://fusesource.com
>>>> Blog: http://davsclaus.blogspot.com/
>>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: The semantics of getIn and getOut (was: message not getting delivered)

Posted by Hadrian Zbarcea <hz...@gmail.com>.
As promised, here's my take [1] on the getIn()/getOut() confusion.
In a few days, when the dust will settle I'll take what's relevant from the post, and the comments that will follow and update the wiki page.

I hope that clarifies the issue better,
Hadrian

[1] http://camelbot.blogspot.com/2010/10/should-you-getin-or-getout.html


On Oct 4, 2010, at 3:58 PM, Mark Webb wrote:

> I agree. But when producing an out I think you need to call
> Exchange.setIn(Message).  Seems like when you call
> Exchange.setOut(Message) you are setting up a request-reply scenario
> which is not what I wanted.
> 
> 
> On Mon, Oct 4, 2010 at 1:54 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:
>> Yeah, there is still a lot of confusion.
>> Unfortunately that page is bollocks and I'll have to get it cleaned up.
>> Mark, I think you did the right thing actually, in a processor one should *not* modify the in, but produce an out, if needed. It's time to get that clarified!
>> 
>> My $0.02,
>> Hadrian
>> 
>> On Oct 4, 2010, at 10:01 AM, Claus Ibsen wrote:
>> 
>>> On Mon, Oct 4, 2010 at 3:57 PM, Mark Webb <el...@gmail.com> wrote:
>>>> Thanks.  I have things working now.
>>>> 
>>>> It seems weird to me though that if in a Processor I take a message
>>>> in, transform it into a newly created Message object that I should
>>>> call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
>>>> think of a Processor as taking "in" a message and then sending it
>>>> "out", but it looks like that is not the case.  Just need to adjust
>>>> the way I think about things.
>>>> 
>>> 
>>> You are not the only one. See this FAQ
>>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>> 
>>>> 
>>>> 
>>>> On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen <cl...@gmail.com> wrote:
>>>>> See this FAQ
>>>>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>>>> 
>>>>> On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb <el...@gmail.com> wrote:
>>>>>> I am sending messages through a Camel route in ActiveMQ.  My message
>>>>>> reaches the end of the processing chain, and at the last processor I
>>>>>> call exchange.setOut( newly created DefaultMessage ).  When I look at
>>>>>> the admin page for ActiveMQ, the topic shows that there is a message
>>>>>> to be dequeued.  It even says that there is a consumer connected to
>>>>>> that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
>>>>>> Consumer.setMessageListener.  So why are the messages not making their
>>>>>> way to my GUI tool?  I am stumped as to why the messages sit in the
>>>>>> topic and never leave if there is a listener for that topic.
>>>>>> 
>>>>>> Of course the first thought is, is the Connection started?  Yeah I
>>>>>> verified that.  In fact I can send messages to the topic via the
>>>>>> web-based admin tool for ActiveMQ and the GUI receives them.
>>>>>> 
>>>>>> Thanks for any help you have,
>>>>>> Mark
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Claus Ibsen
>>>>> Apache Camel Committer
>>>>> 
>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>> Open Source Integration: http://fusesource.com
>>>>> Blog: http://davsclaus.blogspot.com/
>>>>> Twitter: http://twitter.com/davsclaus
>>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>> 
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>> 
>> 


Re: message not getting delivered

Posted by Mark Webb <el...@gmail.com>.
I agree. But when producing an out I think you need to call
Exchange.setIn(Message).  Seems like when you call
Exchange.setOut(Message) you are setting up a request-reply scenario
which is not what I wanted.


On Mon, Oct 4, 2010 at 1:54 PM, Hadrian Zbarcea <hz...@gmail.com> wrote:
> Yeah, there is still a lot of confusion.
> Unfortunately that page is bollocks and I'll have to get it cleaned up.
> Mark, I think you did the right thing actually, in a processor one should *not* modify the in, but produce an out, if needed. It's time to get that clarified!
>
> My $0.02,
> Hadrian
>
> On Oct 4, 2010, at 10:01 AM, Claus Ibsen wrote:
>
>> On Mon, Oct 4, 2010 at 3:57 PM, Mark Webb <el...@gmail.com> wrote:
>>> Thanks.  I have things working now.
>>>
>>> It seems weird to me though that if in a Processor I take a message
>>> in, transform it into a newly created Message object that I should
>>> call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
>>> think of a Processor as taking "in" a message and then sending it
>>> "out", but it looks like that is not the case.  Just need to adjust
>>> the way I think about things.
>>>
>>
>> You are not the only one. See this FAQ
>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>
>>>
>>>
>>> On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen <cl...@gmail.com> wrote:
>>>> See this FAQ
>>>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>>>
>>>> On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb <el...@gmail.com> wrote:
>>>>> I am sending messages through a Camel route in ActiveMQ.  My message
>>>>> reaches the end of the processing chain, and at the last processor I
>>>>> call exchange.setOut( newly created DefaultMessage ).  When I look at
>>>>> the admin page for ActiveMQ, the topic shows that there is a message
>>>>> to be dequeued.  It even says that there is a consumer connected to
>>>>> that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
>>>>> Consumer.setMessageListener.  So why are the messages not making their
>>>>> way to my GUI tool?  I am stumped as to why the messages sit in the
>>>>> topic and never leave if there is a listener for that topic.
>>>>>
>>>>> Of course the first thought is, is the Connection started?  Yeah I
>>>>> verified that.  In fact I can send messages to the topic via the
>>>>> web-based admin tool for ActiveMQ and the GUI receives them.
>>>>>
>>>>> Thanks for any help you have,
>>>>> Mark
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> Apache Camel Committer
>>>>
>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>> Open Source Integration: http://fusesource.com
>>>> Blog: http://davsclaus.blogspot.com/
>>>> Twitter: http://twitter.com/davsclaus
>>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>
>

Re: Splitter Question

Posted by Claus Ibsen <cl...@gmail.com>.
I added an test which works
http://svn.apache.org/viewvc?rev=1005355&view=rev

Could you compare and also you can use the Tracer to see whats going on
http://camel.apache.org/tracer

On Wed, Oct 6, 2010 at 10:26 PM, Russell, Brian <BR...@medplus.com> wrote:
> Also, I assume the "map_object" bean would take CustomPOJO as the input parameter -- correct?
>
>
> -----Original Message-----
> From: Russell, Brian [mailto:BRussell@medplus.com]
> Sent: Wednesday, October 06, 2010 3:51 PM
> To: users@camel.apache.org
> Subject: RE: Splitter Question
>
> Thanks Claus.  I tried that also and still not working.  I verified the List coming out of my bean contains multiple CustomPOJO objects with values.
>
> I just wanted to make sure I am approaching this the correct way.
>
> Brian.
>
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Wednesday, October 06, 2010 2:56 PM
> To: users@camel.apache.org
> Subject: Re: Splitter Question
>
> On Wed, Oct 6, 2010 at 8:23 PM, Russell, Brian <BR...@medplus.com> wrote:
>> In addition to testing my clustered quartz configuration, I have the
>> following question...
>>
>> I have a bean returning a java.util.List<CustomPOJO>  (see get_list
>> below).  I then try to use the <simple>body</simple> to route each
>> CustomPOJO.  See following...
>>
>> <route id="route1">
>>        <from ref="quartz_scheduler" />
>>        <to ref="get_list" />
>>        <split>
>>                <simple>body</simple>
>>                <to ref="map_object" />
>>                <to ref="jms_queue" />
>>        </split>
>> </route>
>>
>> It's not reaching the "map_object" bean endpoint.
>>
>> Should this be working or am I misconfiguring something?
>>
>> I am using camel 2.4.
>
> Can't remember if there was a bug/issue there when doing <simple>body</simple>
> You can try with <simple>${body}</simple>.
>
>>
>> Thanks.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>>
>>
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

RE: Splitter Question

Posted by "Russell, Brian" <BR...@medplus.com>.
Also, I assume the "map_object" bean would take CustomPOJO as the input parameter -- correct?


-----Original Message-----
From: Russell, Brian [mailto:BRussell@medplus.com] 
Sent: Wednesday, October 06, 2010 3:51 PM
To: users@camel.apache.org
Subject: RE: Splitter Question

Thanks Claus.  I tried that also and still not working.  I verified the List coming out of my bean contains multiple CustomPOJO objects with values.

I just wanted to make sure I am approaching this the correct way.

Brian.


-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Wednesday, October 06, 2010 2:56 PM
To: users@camel.apache.org
Subject: Re: Splitter Question

On Wed, Oct 6, 2010 at 8:23 PM, Russell, Brian <BR...@medplus.com> wrote:
> In addition to testing my clustered quartz configuration, I have the
> following question...
>
> I have a bean returning a java.util.List<CustomPOJO>  (see get_list
> below).  I then try to use the <simple>body</simple> to route each
> CustomPOJO.  See following...
>
> <route id="route1">
>        <from ref="quartz_scheduler" />
>        <to ref="get_list" />
>        <split>
>                <simple>body</simple>
>                <to ref="map_object" />
>                <to ref="jms_queue" />
>        </split>
> </route>
>
> It's not reaching the "map_object" bean endpoint.
>
> Should this be working or am I misconfiguring something?
>
> I am using camel 2.4.

Can't remember if there was a bug/issue there when doing <simple>body</simple>
You can try with <simple>${body}</simple>.

>
> Thanks.
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus










Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.













Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.




RE: Splitter Question

Posted by "Russell, Brian" <BR...@medplus.com>.
Thanks Claus.  I tried that also and still not working.  I verified the List coming out of my bean contains multiple CustomPOJO objects with values.

I just wanted to make sure I am approaching this the correct way.

Brian.


-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Wednesday, October 06, 2010 2:56 PM
To: users@camel.apache.org
Subject: Re: Splitter Question

On Wed, Oct 6, 2010 at 8:23 PM, Russell, Brian <BR...@medplus.com> wrote:
> In addition to testing my clustered quartz configuration, I have the
> following question...
>
> I have a bean returning a java.util.List<CustomPOJO>  (see get_list
> below).  I then try to use the <simple>body</simple> to route each
> CustomPOJO.  See following...
>
> <route id="route1">
>        <from ref="quartz_scheduler" />
>        <to ref="get_list" />
>        <split>
>                <simple>body</simple>
>                <to ref="map_object" />
>                <to ref="jms_queue" />
>        </split>
> </route>
>
> It's not reaching the "map_object" bean endpoint.
>
> Should this be working or am I misconfiguring something?
>
> I am using camel 2.4.

Can't remember if there was a bug/issue there when doing <simple>body</simple>
You can try with <simple>${body}</simple>.

>
> Thanks.
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus










Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.




Re: Splitter Question

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Oct 6, 2010 at 8:23 PM, Russell, Brian <BR...@medplus.com> wrote:
> In addition to testing my clustered quartz configuration, I have the
> following question...
>
> I have a bean returning a java.util.List<CustomPOJO>  (see get_list
> below).  I then try to use the <simple>body</simple> to route each
> CustomPOJO.  See following...
>
> <route id="route1">
>        <from ref="quartz_scheduler" />
>        <to ref="get_list" />
>        <split>
>                <simple>body</simple>
>                <to ref="map_object" />
>                <to ref="jms_queue" />
>        </split>
> </route>
>
> It's not reaching the "map_object" bean endpoint.
>
> Should this be working or am I misconfiguring something?
>
> I am using camel 2.4.

Can't remember if there was a bug/issue there when doing <simple>body</simple>
You can try with <simple>${body}</simple>.

>
> Thanks.
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Splitter Question

Posted by "Russell, Brian" <BR...@medplus.com>.
In addition to testing my clustered quartz configuration, I have the
following question...

I have a bean returning a java.util.List<CustomPOJO>  (see get_list
below).  I then try to use the <simple>body</simple> to route each
CustomPOJO.  See following...

<route id="route1">
	<from ref="quartz_scheduler" />
	<to ref="get_list" />
	<split>
		<simple>body</simple>
		<to ref="map_object" />
		<to ref="jms_queue" />
	</split>
</route>

It's not reaching the "map_object" bean endpoint.

Should this be working or am I misconfiguring something?

I am using camel 2.4.

Thanks.










Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.




Re: Quartz Camel Spring Example?

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Oct 6, 2010 at 2:57 PM, Russell, Brian <BR...@medplus.com> wrote:
> I did get this working for a single server -- thank you.
>
> As a follow-up, how can I implement this in a singleton mode across a cluster?
>
> I need the trigger to only fire on one server in the cluster at a time.
>

This is what Quartz can do by its own. It can work in a cluster if you
use the DB, which lets all node race for the shared lock in the shared
DB. And only one will win and figure the triggers.

That means only one Camel route should trigger as well.

There has been a couple of guys around which did this. We found some
problems with OSGi in Camel 2.3 which we fixed in 2.4.
You can probably search this forum for those talks.



> I have this implemented using quartz outside of the camel context where the clustered timers race to lock a database but only one wins and actually fires.
>
> However, I am unclear on how this transfers into the camel implementation.
>
> ?
>
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Tuesday, October 05, 2010 11:12 AM
> To: users@camel.apache.org
> Subject: Re: Quartz Camel Spring Example?
>
> On Tue, Oct 5, 2010 at 3:56 PM, Russell, Brian <BR...@medplus.com> wrote:
>> Thanks very much.  I guess the part that I'm not understanding in this
>> is how to get a List<Object> to return from a method where I can then
>> split it out based on a quart cron trigger.
>>
>> Let me ask it this way -- is the quartz implementation in camel
>> literally just the timer part of the process?  So that, when it kicks
>> off, it pulls from your "from" endpoint to your "to" endpoint?
>>
>
> Yes quartz is just the scheduler. You can just use a bean/processor to
> get the List<Object>.
>
> from(qartz)
> to(beanThatGetTheList)
> ...
>
>
>> So I would have something like the following:
>>
>>        <endpoint id="quartz_scheduler"
>> uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" />
>>
>>        <route id="route1">
>>                <from ref="quartz_scheduler" />
>>            <to ref="beanReturningListObject">
>>                <split>
>>                        <simple>body</simple>
>>                        <to ref="map_objects" />
>>                        <to ref="jms_queue" />
>>                </split>
>>        </route>
>>
>> Is quartz_scheduler just a cron expression or does it actually map to a
>> bean?  Does quartzTrigger need to be defined as a bean also?  In my
>> quartz-only implementation, I actually create a custom trigger bean and
>> a custom job bean.  The job bean in that scenario would execute a
>> service layer to get the objects, iterate through them, move them to a
>> MapMessage, and drop them on the queue.
>>
>> With this, I'm trying to have a quartz job return a List<Object and drop
>> each object onto the queue.
>>
>> I'm just not quite following how this stream gets mapped together
>> through the spring configuration?
>>
>> ?
>>
>>
>> -----Original Message-----
>> From: Ashwin Karpe [mailto:akarpe@fusesource.com]
>> Sent: Monday, October 04, 2010 3:14 PM
>> To: users@camel.apache.org
>> Subject: Re: Quartz Camel Spring Example?
>>
>>
>> Hi,
>>
>> Check out the following links
>>
>> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>> .xml?view=markup
>> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>> .xml?view=markup
>>
>> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>> ?view=markup
>> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>> ?view=markup
>>
>> Cheers,
>>
>> Ashwin...
>>
>>
>> -----
>> ---------------------------------------------------------
>> Ashwin Karpe
>> Apache Camel Committer & Sr Principal Consultant
>> FUSESource (a Progress Software Corporation subsidiary)
>> http://fusesource.com http://fusesource.com
>>
>> Blog: http://opensourceknowledge.blogspot.com
>> http://opensourceknowledge.blogspot.com
>> ---------------------------------------------------------
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328
>> 1p3198239.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>>
>>
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Quartz Camel Spring Example?

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Oct 6, 2010 at 3:15 PM, Russell, Brian <BR...@medplus.com> wrote:
> That makes sense logically in terms of what is needed, but quartz does
> this by default.  In doing this in a straight quartz context, I was able
> to do this through configuration (and setting up the quartz database
> tables).
>
> Is this type of functionality not implemented yet in camel or do I need
> to write the specific code to to this?  Or am I missing something?
>

No you just need to configure Quartz to be clustered with the DB stuff.

Then you just configure the QuartzComponent to use your quartz.properties file
See: http://camel.apache.org/quartz


> Thanks for your help.
>
>
> -----Original Message-----
> From: Hadrian Zbarcea [mailto:hzbarcea@gmail.com]
> Sent: Wednesday, October 06, 2010 9:05 AM
> To: users@camel.apache.org
> Subject: Re: Quartz Camel Spring Example?
>
> Yes, it is fairly easy. You have to have a way though to communicate
> across instances in a cluster. So you will need a processor that sets
> the lock and a filter that will drop the quartz message (trigger event)
> if not the first.
>
> I hope this helps.
> Hadrian
>
>
> On Oct 6, 2010, at 8:57 AM, Russell, Brian wrote:
>
>> I did get this working for a single server -- thank you.
>>
>> As a follow-up, how can I implement this in a singleton mode across a
> cluster?
>>
>> I need the trigger to only fire on one server in the cluster at a
> time.
>>
>> I have this implemented using quartz outside of the camel context
> where the clustered timers race to lock a database but only one wins and
> actually fires.
>>
>> However, I am unclear on how this transfers into the camel
> implementation.
>>
>> ?
>>
>>
>> -----Original Message-----
>> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
>> Sent: Tuesday, October 05, 2010 11:12 AM
>> To: users@camel.apache.org
>> Subject: Re: Quartz Camel Spring Example?
>>
>> On Tue, Oct 5, 2010 at 3:56 PM, Russell, Brian <BR...@medplus.com>
> wrote:
>>> Thanks very much.  I guess the part that I'm not understanding in
> this
>>> is how to get a List<Object> to return from a method where I can then
>>> split it out based on a quart cron trigger.
>>>
>>> Let me ask it this way -- is the quartz implementation in camel
>>> literally just the timer part of the process?  So that, when it kicks
>>> off, it pulls from your "from" endpoint to your "to" endpoint?
>>>
>>
>> Yes quartz is just the scheduler. You can just use a bean/processor to
>> get the List<Object>.
>>
>> from(qartz)
>> to(beanThatGetTheList)
>> ...
>>
>>
>>> So I would have something like the following:
>>>
>>>        <endpoint id="quartz_scheduler"
>>> uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" />
>>>
>>>        <route id="route1">
>>>                <from ref="quartz_scheduler" />
>>>            <to ref="beanReturningListObject">
>>>                <split>
>>>                        <simple>body</simple>
>>>                        <to ref="map_objects" />
>>>                        <to ref="jms_queue" />
>>>                </split>
>>>        </route>
>>>
>>> Is quartz_scheduler just a cron expression or does it actually map to
> a
>>> bean?  Does quartzTrigger need to be defined as a bean also?  In my
>>> quartz-only implementation, I actually create a custom trigger bean
> and
>>> a custom job bean.  The job bean in that scenario would execute a
>>> service layer to get the objects, iterate through them, move them to
> a
>>> MapMessage, and drop them on the queue.
>>>
>>> With this, I'm trying to have a quartz job return a List<Object and
> drop
>>> each object onto the queue.
>>>
>>> I'm just not quite following how this stream gets mapped together
>>> through the spring configuration?
>>>
>>> ?
>>>
>>>
>>> -----Original Message-----
>>> From: Ashwin Karpe [mailto:akarpe@fusesource.com]
>>> Sent: Monday, October 04, 2010 3:14 PM
>>> To: users@camel.apache.org
>>> Subject: Re: Quartz Camel Spring Example?
>>>
>>>
>>> Hi,
>>>
>>> Check out the following links
>>>
>>>
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>>
> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>>> .xml?view=markup
>>>
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>>
> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>>> .xml?view=markup
>>>
>>>
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>>
> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>>> ?view=markup
>>>
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>>
> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>>> ?view=markup
>>>
>>> Cheers,
>>>
>>> Ashwin...
>>>
>>>
>>> -----
>>> ---------------------------------------------------------
>>> Ashwin Karpe
>>> Apache Camel Committer & Sr Principal Consultant
>>> FUSESource (a Progress Software Corporation subsidiary)
>>> http://fusesource.com http://fusesource.com
>>>
>>> Blog: http://opensourceknowledge.blogspot.com
>>> http://opensourceknowledge.blogspot.com
>>> ---------------------------------------------------------
>>> --
>>> View this message in context:
>>>
> http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328
>>> 1p3198239.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Confidentiality Notice: The information contained in this electronic
> transmission is confidential and may be legally privileged. It is
> intended only for the addressee(s) named above. If you are not an
> intended recipient, be aware that any disclosure, copying, distribution
> or use of the information contained in this transmission is prohibited
> and may be unlawful. If you have received this transmission in error,
> please notify us by telephone (513) 229-5500 or by email
> (postmaster@MedPlus.com). After replying, please erase it from your
> computer system.
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Confidentiality Notice: The information contained in this electronic
> transmission is confidential and may be legally privileged. It is
> intended only for the addressee(s) named above. If you are not an
> intended recipient, be aware that any disclosure, copying, distribution
> or use of the information contained in this transmission is prohibited
> and may be unlawful. If you have received this transmission in error,
> please notify us by telephone (513) 229-5500 or by email
> (postmaster@MedPlus.com). After replying, please erase it from your
> computer system.
>>
>>
>>
>
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Quartz Camel Spring Example?

Posted by Hadrian Zbarcea <hz...@gmail.com>.
That's not currently possible afaik using camel quartz configuration. I'd have to try that though to answer for sure. 
Camel works great on cluster deployments with stateless routes. There is a bit more work to do for stateful routes, we'll address in 3.0.

Maybe somebody on the list did that already and has a solution?

Hadrian


On Oct 6, 2010, at 9:15 AM, Russell, Brian wrote:

> That makes sense logically in terms of what is needed, but quartz does
> this by default.  In doing this in a straight quartz context, I was able
> to do this through configuration (and setting up the quartz database
> tables).  
> 
> Is this type of functionality not implemented yet in camel or do I need
> to write the specific code to to this?  Or am I missing something?
> 
> Thanks for your help.
> 
> 
> -----Original Message-----
> From: Hadrian Zbarcea [mailto:hzbarcea@gmail.com] 
> Sent: Wednesday, October 06, 2010 9:05 AM
> To: users@camel.apache.org
> Subject: Re: Quartz Camel Spring Example?
> 
> Yes, it is fairly easy. You have to have a way though to communicate
> across instances in a cluster. So you will need a processor that sets
> the lock and a filter that will drop the quartz message (trigger event)
> if not the first.
> 
> I hope this helps.
> Hadrian
> 
> 
> On Oct 6, 2010, at 8:57 AM, Russell, Brian wrote:
> 
>> I did get this working for a single server -- thank you. 
>> 
>> As a follow-up, how can I implement this in a singleton mode across a
> cluster?
>> 
>> I need the trigger to only fire on one server in the cluster at a
> time.
>> 
>> I have this implemented using quartz outside of the camel context
> where the clustered timers race to lock a database but only one wins and
> actually fires.
>> 
>> However, I am unclear on how this transfers into the camel
> implementation.
>> 
>> ?
>> 
>> 
>> -----Original Message-----
>> From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
>> Sent: Tuesday, October 05, 2010 11:12 AM
>> To: users@camel.apache.org
>> Subject: Re: Quartz Camel Spring Example?
>> 
>> On Tue, Oct 5, 2010 at 3:56 PM, Russell, Brian <BR...@medplus.com>
> wrote:
>>> Thanks very much.  I guess the part that I'm not understanding in
> this
>>> is how to get a List<Object> to return from a method where I can then
>>> split it out based on a quart cron trigger.
>>> 
>>> Let me ask it this way -- is the quartz implementation in camel
>>> literally just the timer part of the process?  So that, when it kicks
>>> off, it pulls from your "from" endpoint to your "to" endpoint?
>>> 
>> 
>> Yes quartz is just the scheduler. You can just use a bean/processor to
>> get the List<Object>.
>> 
>> from(qartz)
>> to(beanThatGetTheList)
>> ...
>> 
>> 
>>> So I would have something like the following:
>>> 
>>>       <endpoint id="quartz_scheduler"
>>> uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" />
>>> 
>>>       <route id="route1">
>>>               <from ref="quartz_scheduler" />
>>>           <to ref="beanReturningListObject">
>>>               <split>
>>>                       <simple>body</simple>
>>>                       <to ref="map_objects" />
>>>                       <to ref="jms_queue" />
>>>               </split>
>>>       </route>
>>> 
>>> Is quartz_scheduler just a cron expression or does it actually map to
> a
>>> bean?  Does quartzTrigger need to be defined as a bean also?  In my
>>> quartz-only implementation, I actually create a custom trigger bean
> and
>>> a custom job bean.  The job bean in that scenario would execute a
>>> service layer to get the objects, iterate through them, move them to
> a
>>> MapMessage, and drop them on the queue.
>>> 
>>> With this, I'm trying to have a quartz job return a List<Object and
> drop
>>> each object onto the queue.
>>> 
>>> I'm just not quite following how this stream gets mapped together
>>> through the spring configuration?
>>> 
>>> ?
>>> 
>>> 
>>> -----Original Message-----
>>> From: Ashwin Karpe [mailto:akarpe@fusesource.com]
>>> Sent: Monday, October 04, 2010 3:14 PM
>>> To: users@camel.apache.org
>>> Subject: Re: Quartz Camel Spring Example?
>>> 
>>> 
>>> Hi,
>>> 
>>> Check out the following links
>>> 
>>> 
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>> 
> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>>> .xml?view=markup
>>> 
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>> 
> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>>> .xml?view=markup
>>> 
>>> 
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>> 
> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>>> ?view=markup
>>> 
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>> 
> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>>> ?view=markup
>>> 
>>> Cheers,
>>> 
>>> Ashwin...
>>> 
>>> 
>>> -----
>>> ---------------------------------------------------------
>>> Ashwin Karpe
>>> Apache Camel Committer & Sr Principal Consultant
>>> FUSESource (a Progress Software Corporation subsidiary)
>>> http://fusesource.com http://fusesource.com
>>> 
>>> Blog: http://opensourceknowledge.blogspot.com
>>> http://opensourceknowledge.blogspot.com
>>> ---------------------------------------------------------
>>> --
>>> View this message in context:
>>> 
> http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328
>>> 1p3198239.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Confidentiality Notice: The information contained in this electronic
> transmission is confidential and may be legally privileged. It is
> intended only for the addressee(s) named above. If you are not an
> intended recipient, be aware that any disclosure, copying, distribution
> or use of the information contained in this transmission is prohibited
> and may be unlawful. If you have received this transmission in error,
> please notify us by telephone (513) 229-5500 or by email
> (postmaster@MedPlus.com). After replying, please erase it from your
> computer system.
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> 
>> -- 
>> Claus Ibsen
>> Apache Camel Committer
>> 
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Confidentiality Notice: The information contained in this electronic
> transmission is confidential and may be legally privileged. It is
> intended only for the addressee(s) named above. If you are not an
> intended recipient, be aware that any disclosure, copying, distribution
> or use of the information contained in this transmission is prohibited
> and may be unlawful. If you have received this transmission in error,
> please notify us by telephone (513) 229-5500 or by email
> (postmaster@MedPlus.com). After replying, please erase it from your
> computer system.
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
> 
> 
> 


RE: Quartz Camel Spring Example?

Posted by "Russell, Brian" <BR...@medplus.com>.
That makes sense logically in terms of what is needed, but quartz does
this by default.  In doing this in a straight quartz context, I was able
to do this through configuration (and setting up the quartz database
tables).  

Is this type of functionality not implemented yet in camel or do I need
to write the specific code to to this?  Or am I missing something?

Thanks for your help.


-----Original Message-----
From: Hadrian Zbarcea [mailto:hzbarcea@gmail.com] 
Sent: Wednesday, October 06, 2010 9:05 AM
To: users@camel.apache.org
Subject: Re: Quartz Camel Spring Example?

Yes, it is fairly easy. You have to have a way though to communicate
across instances in a cluster. So you will need a processor that sets
the lock and a filter that will drop the quartz message (trigger event)
if not the first.

I hope this helps.
Hadrian


On Oct 6, 2010, at 8:57 AM, Russell, Brian wrote:

> I did get this working for a single server -- thank you. 
> 
> As a follow-up, how can I implement this in a singleton mode across a
cluster?
> 
> I need the trigger to only fire on one server in the cluster at a
time.
> 
> I have this implemented using quartz outside of the camel context
where the clustered timers race to lock a database but only one wins and
actually fires.
> 
> However, I am unclear on how this transfers into the camel
implementation.
> 
> ?
> 
> 
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
> Sent: Tuesday, October 05, 2010 11:12 AM
> To: users@camel.apache.org
> Subject: Re: Quartz Camel Spring Example?
> 
> On Tue, Oct 5, 2010 at 3:56 PM, Russell, Brian <BR...@medplus.com>
wrote:
>> Thanks very much.  I guess the part that I'm not understanding in
this
>> is how to get a List<Object> to return from a method where I can then
>> split it out based on a quart cron trigger.
>> 
>> Let me ask it this way -- is the quartz implementation in camel
>> literally just the timer part of the process?  So that, when it kicks
>> off, it pulls from your "from" endpoint to your "to" endpoint?
>> 
> 
> Yes quartz is just the scheduler. You can just use a bean/processor to
> get the List<Object>.
> 
> from(qartz)
> to(beanThatGetTheList)
> ...
> 
> 
>> So I would have something like the following:
>> 
>>        <endpoint id="quartz_scheduler"
>> uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" />
>> 
>>        <route id="route1">
>>                <from ref="quartz_scheduler" />
>>            <to ref="beanReturningListObject">
>>                <split>
>>                        <simple>body</simple>
>>                        <to ref="map_objects" />
>>                        <to ref="jms_queue" />
>>                </split>
>>        </route>
>> 
>> Is quartz_scheduler just a cron expression or does it actually map to
a
>> bean?  Does quartzTrigger need to be defined as a bean also?  In my
>> quartz-only implementation, I actually create a custom trigger bean
and
>> a custom job bean.  The job bean in that scenario would execute a
>> service layer to get the objects, iterate through them, move them to
a
>> MapMessage, and drop them on the queue.
>> 
>> With this, I'm trying to have a quartz job return a List<Object and
drop
>> each object onto the queue.
>> 
>> I'm just not quite following how this stream gets mapped together
>> through the spring configuration?
>> 
>> ?
>> 
>> 
>> -----Original Message-----
>> From: Ashwin Karpe [mailto:akarpe@fusesource.com]
>> Sent: Monday, October 04, 2010 3:14 PM
>> To: users@camel.apache.org
>> Subject: Re: Quartz Camel Spring Example?
>> 
>> 
>> Hi,
>> 
>> Check out the following links
>> 
>>
https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>
st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>> .xml?view=markup
>>
https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>
st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>> .xml?view=markup
>> 
>>
https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>
st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>> ?view=markup
>>
https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>>
st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>> ?view=markup
>> 
>> Cheers,
>> 
>> Ashwin...
>> 
>> 
>> -----
>> ---------------------------------------------------------
>> Ashwin Karpe
>> Apache Camel Committer & Sr Principal Consultant
>> FUSESource (a Progress Software Corporation subsidiary)
>> http://fusesource.com http://fusesource.com
>> 
>> Blog: http://opensourceknowledge.blogspot.com
>> http://opensourceknowledge.blogspot.com
>> ---------------------------------------------------------
>> --
>> View this message in context:
>>
http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328
>> 1p3198239.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Confidentiality Notice: The information contained in this electronic
transmission is confidential and may be legally privileged. It is
intended only for the addressee(s) named above. If you are not an
intended recipient, be aware that any disclosure, copying, distribution
or use of the information contained in this transmission is prohibited
and may be unlawful. If you have received this transmission in error,
please notify us by telephone (513) 229-5500 or by email
(postmaster@MedPlus.com). After replying, please erase it from your
computer system.
>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Confidentiality Notice: The information contained in this electronic
transmission is confidential and may be legally privileged. It is
intended only for the addressee(s) named above. If you are not an
intended recipient, be aware that any disclosure, copying, distribution
or use of the information contained in this transmission is prohibited
and may be unlawful. If you have received this transmission in error,
please notify us by telephone (513) 229-5500 or by email
(postmaster@MedPlus.com). After replying, please erase it from your
computer system.
> 
> 
> 











Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.




Re: Quartz Camel Spring Example?

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Yes, it is fairly easy. You have to have a way though to communicate across instances in a cluster. So you will need a processor that sets the lock and a filter that will drop the quartz message (trigger event) if not the first.

I hope this helps.
Hadrian


On Oct 6, 2010, at 8:57 AM, Russell, Brian wrote:

> I did get this working for a single server -- thank you. 
> 
> As a follow-up, how can I implement this in a singleton mode across a cluster?
> 
> I need the trigger to only fire on one server in the cluster at a time.
> 
> I have this implemented using quartz outside of the camel context where the clustered timers race to lock a database but only one wins and actually fires.
> 
> However, I am unclear on how this transfers into the camel implementation.
> 
> ?
> 
> 
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
> Sent: Tuesday, October 05, 2010 11:12 AM
> To: users@camel.apache.org
> Subject: Re: Quartz Camel Spring Example?
> 
> On Tue, Oct 5, 2010 at 3:56 PM, Russell, Brian <BR...@medplus.com> wrote:
>> Thanks very much.  I guess the part that I'm not understanding in this
>> is how to get a List<Object> to return from a method where I can then
>> split it out based on a quart cron trigger.
>> 
>> Let me ask it this way -- is the quartz implementation in camel
>> literally just the timer part of the process?  So that, when it kicks
>> off, it pulls from your "from" endpoint to your "to" endpoint?
>> 
> 
> Yes quartz is just the scheduler. You can just use a bean/processor to
> get the List<Object>.
> 
> from(qartz)
> to(beanThatGetTheList)
> ...
> 
> 
>> So I would have something like the following:
>> 
>>        <endpoint id="quartz_scheduler"
>> uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" />
>> 
>>        <route id="route1">
>>                <from ref="quartz_scheduler" />
>>            <to ref="beanReturningListObject">
>>                <split>
>>                        <simple>body</simple>
>>                        <to ref="map_objects" />
>>                        <to ref="jms_queue" />
>>                </split>
>>        </route>
>> 
>> Is quartz_scheduler just a cron expression or does it actually map to a
>> bean?  Does quartzTrigger need to be defined as a bean also?  In my
>> quartz-only implementation, I actually create a custom trigger bean and
>> a custom job bean.  The job bean in that scenario would execute a
>> service layer to get the objects, iterate through them, move them to a
>> MapMessage, and drop them on the queue.
>> 
>> With this, I'm trying to have a quartz job return a List<Object and drop
>> each object onto the queue.
>> 
>> I'm just not quite following how this stream gets mapped together
>> through the spring configuration?
>> 
>> ?
>> 
>> 
>> -----Original Message-----
>> From: Ashwin Karpe [mailto:akarpe@fusesource.com]
>> Sent: Monday, October 04, 2010 3:14 PM
>> To: users@camel.apache.org
>> Subject: Re: Quartz Camel Spring Example?
>> 
>> 
>> Hi,
>> 
>> Check out the following links
>> 
>> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>> .xml?view=markup
>> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
>> .xml?view=markup
>> 
>> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>> ?view=markup
>> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
>> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
>> ?view=markup
>> 
>> Cheers,
>> 
>> Ashwin...
>> 
>> 
>> -----
>> ---------------------------------------------------------
>> Ashwin Karpe
>> Apache Camel Committer & Sr Principal Consultant
>> FUSESource (a Progress Software Corporation subsidiary)
>> http://fusesource.com http://fusesource.com
>> 
>> Blog: http://opensourceknowledge.blogspot.com
>> http://opensourceknowledge.blogspot.com
>> ---------------------------------------------------------
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328
>> 1p3198239.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
> 
> 
> 


RE: Quartz Camel Spring Example?

Posted by "Russell, Brian" <BR...@medplus.com>.
I did get this working for a single server -- thank you. 

As a follow-up, how can I implement this in a singleton mode across a cluster?

I need the trigger to only fire on one server in the cluster at a time.

I have this implemented using quartz outside of the camel context where the clustered timers race to lock a database but only one wins and actually fires.

However, I am unclear on how this transfers into the camel implementation.

?


-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Tuesday, October 05, 2010 11:12 AM
To: users@camel.apache.org
Subject: Re: Quartz Camel Spring Example?

On Tue, Oct 5, 2010 at 3:56 PM, Russell, Brian <BR...@medplus.com> wrote:
> Thanks very much.  I guess the part that I'm not understanding in this
> is how to get a List<Object> to return from a method where I can then
> split it out based on a quart cron trigger.
>
> Let me ask it this way -- is the quartz implementation in camel
> literally just the timer part of the process?  So that, when it kicks
> off, it pulls from your "from" endpoint to your "to" endpoint?
>

Yes quartz is just the scheduler. You can just use a bean/processor to
get the List<Object>.

from(qartz)
to(beanThatGetTheList)
...


> So I would have something like the following:
>
>        <endpoint id="quartz_scheduler"
> uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" />
>
>        <route id="route1">
>                <from ref="quartz_scheduler" />
>            <to ref="beanReturningListObject">
>                <split>
>                        <simple>body</simple>
>                        <to ref="map_objects" />
>                        <to ref="jms_queue" />
>                </split>
>        </route>
>
> Is quartz_scheduler just a cron expression or does it actually map to a
> bean?  Does quartzTrigger need to be defined as a bean also?  In my
> quartz-only implementation, I actually create a custom trigger bean and
> a custom job bean.  The job bean in that scenario would execute a
> service layer to get the objects, iterate through them, move them to a
> MapMessage, and drop them on the queue.
>
> With this, I'm trying to have a quartz job return a List<Object and drop
> each object onto the queue.
>
> I'm just not quite following how this stream gets mapped together
> through the spring configuration?
>
> ?
>
>
> -----Original Message-----
> From: Ashwin Karpe [mailto:akarpe@fusesource.com]
> Sent: Monday, October 04, 2010 3:14 PM
> To: users@camel.apache.org
> Subject: Re: Quartz Camel Spring Example?
>
>
> Hi,
>
> Check out the following links
>
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
> .xml?view=markup
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
> .xml?view=markup
>
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
> ?view=markup
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
> ?view=markup
>
> Cheers,
>
> Ashwin...
>
>
> -----
> ---------------------------------------------------------
> Ashwin Karpe
> Apache Camel Committer & Sr Principal Consultant
> FUSESource (a Progress Software Corporation subsidiary)
> http://fusesource.com http://fusesource.com
>
> Blog: http://opensourceknowledge.blogspot.com
> http://opensourceknowledge.blogspot.com
> ---------------------------------------------------------
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328
> 1p3198239.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus










Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.




Re: Quartz Camel Spring Example?

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Oct 5, 2010 at 3:56 PM, Russell, Brian <BR...@medplus.com> wrote:
> Thanks very much.  I guess the part that I'm not understanding in this
> is how to get a List<Object> to return from a method where I can then
> split it out based on a quart cron trigger.
>
> Let me ask it this way -- is the quartz implementation in camel
> literally just the timer part of the process?  So that, when it kicks
> off, it pulls from your "from" endpoint to your "to" endpoint?
>

Yes quartz is just the scheduler. You can just use a bean/processor to
get the List<Object>.

from(qartz)
to(beanThatGetTheList)
...


> So I would have something like the following:
>
>        <endpoint id="quartz_scheduler"
> uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" />
>
>        <route id="route1">
>                <from ref="quartz_scheduler" />
>            <to ref="beanReturningListObject">
>                <split>
>                        <simple>body</simple>
>                        <to ref="map_objects" />
>                        <to ref="jms_queue" />
>                </split>
>        </route>
>
> Is quartz_scheduler just a cron expression or does it actually map to a
> bean?  Does quartzTrigger need to be defined as a bean also?  In my
> quartz-only implementation, I actually create a custom trigger bean and
> a custom job bean.  The job bean in that scenario would execute a
> service layer to get the objects, iterate through them, move them to a
> MapMessage, and drop them on the queue.
>
> With this, I'm trying to have a quartz job return a List<Object and drop
> each object onto the queue.
>
> I'm just not quite following how this stream gets mapped together
> through the spring configuration?
>
> ?
>
>
> -----Original Message-----
> From: Ashwin Karpe [mailto:akarpe@fusesource.com]
> Sent: Monday, October 04, 2010 3:14 PM
> To: users@camel.apache.org
> Subject: Re: Quartz Camel Spring Example?
>
>
> Hi,
>
> Check out the following links
>
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
> .xml?view=markup
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
> st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
> .xml?view=markup
>
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
> ?view=markup
> https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
> st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
> ?view=markup
>
> Cheers,
>
> Ashwin...
>
>
> -----
> ---------------------------------------------------------
> Ashwin Karpe
> Apache Camel Committer & Sr Principal Consultant
> FUSESource (a Progress Software Corporation subsidiary)
> http://fusesource.com http://fusesource.com
>
> Blog: http://opensourceknowledge.blogspot.com
> http://opensourceknowledge.blogspot.com
> ---------------------------------------------------------
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328
> 1p3198239.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
>
>
>
>
>
>
>
> Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

RE: Quartz Camel Spring Example?

Posted by "Russell, Brian" <BR...@medplus.com>.
Thanks very much.  I guess the part that I'm not understanding in this
is how to get a List<Object> to return from a method where I can then
split it out based on a quart cron trigger.

Let me ask it this way -- is the quartz implementation in camel
literally just the timer part of the process?  So that, when it kicks
off, it pulls from your "from" endpoint to your "to" endpoint?

So I would have something like the following:

	<endpoint id="quartz_scheduler"
uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" />

	<route id="route1">
		<from ref="quartz_scheduler" />
            <to ref="beanReturningListObject">
		<split>
			<simple>body</simple>
			<to ref="map_objects" />
			<to ref="jms_queue" />
		</split>
	</route>

Is quartz_scheduler just a cron expression or does it actually map to a
bean?  Does quartzTrigger need to be defined as a bean also?  In my
quartz-only implementation, I actually create a custom trigger bean and
a custom job bean.  The job bean in that scenario would execute a
service layer to get the objects, iterate through them, move them to a
MapMessage, and drop them on the queue.

With this, I'm trying to have a quartz job return a List<Object and drop
each object onto the queue.

I'm just not quite following how this stream gets mapped together
through the spring configuration?

?


-----Original Message-----
From: Ashwin Karpe [mailto:akarpe@fusesource.com] 
Sent: Monday, October 04, 2010 3:14 PM
To: users@camel.apache.org
Subject: Re: Quartz Camel Spring Example?


Hi,

Check out the following links

https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
.xml?view=markup
https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest
.xml?view=markup 

https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
?view=markup
https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te
st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java
?view=markup 

Cheers,

Ashwin...


-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com
http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
-- 
View this message in context:
http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328
1p3198239.html
Sent from the Camel - Users mailing list archive at Nabble.com.










Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.




Re: Quartz Camel Spring Example?

Posted by Ashwin Karpe <ak...@fusesource.com>.
Hi,

Check out the following links

https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.xml?view=markup
https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.xml?view=markup 

https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java?view=markup
https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java?view=markup 

Cheers,

Ashwin...


-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com
http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
-- 
View this message in context: http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp3073281p3198239.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Quartz Camel Spring Example?

Posted by "Russell, Brian" <BR...@medplus.com>.
I have deployed a working quartz cron trigger outside of the camel
configuration.

We are in the process of implementing our backend processes using camel.
So far, this is going well and have not hit any major obstacles -- so
very pleased.

I have a new quartz trigger that I am wanting to setup and can easily do
it outside of camel.

I am trying to setup the new quartz trigger inside of camel but am not
quite getting it implemented properly.

Basically, I want a trigger to fire every few minutes and load a List of
java objects from the database.

I want to take this list (assuming the Splitter pattern) and produce a
message onto a jms queue.

Are there any similar examples of this that I can reference using the
Spring Configuration?

I'm not quite understanding how to return the List of objects from the
quartz job into the camel route where I can split it out from there.

Thanks for any guidance.










Confidentiality Notice: The information contained in this electronic transmission is confidential and may be legally privileged. It is intended only for the addressee(s) named above. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by telephone (513) 229-5500 or by email (postmaster@MedPlus.com). After replying, please erase it from your computer system.




Re: message not getting delivered

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Yeah, there is still a lot of confusion. 
Unfortunately that page is bollocks and I'll have to get it cleaned up.
Mark, I think you did the right thing actually, in a processor one should *not* modify the in, but produce an out, if needed. It's time to get that clarified!

My $0.02,
Hadrian

On Oct 4, 2010, at 10:01 AM, Claus Ibsen wrote:

> On Mon, Oct 4, 2010 at 3:57 PM, Mark Webb <el...@gmail.com> wrote:
>> Thanks.  I have things working now.
>> 
>> It seems weird to me though that if in a Processor I take a message
>> in, transform it into a newly created Message object that I should
>> call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
>> think of a Processor as taking "in" a message and then sending it
>> "out", but it looks like that is not the case.  Just need to adjust
>> the way I think about things.
>> 
> 
> You are not the only one. See this FAQ
> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
> 
>> 
>> 
>> On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen <cl...@gmail.com> wrote:
>>> See this FAQ
>>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>> 
>>> On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb <el...@gmail.com> wrote:
>>>> I am sending messages through a Camel route in ActiveMQ.  My message
>>>> reaches the end of the processing chain, and at the last processor I
>>>> call exchange.setOut( newly created DefaultMessage ).  When I look at
>>>> the admin page for ActiveMQ, the topic shows that there is a message
>>>> to be dequeued.  It even says that there is a consumer connected to
>>>> that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
>>>> Consumer.setMessageListener.  So why are the messages not making their
>>>> way to my GUI tool?  I am stumped as to why the messages sit in the
>>>> topic and never leave if there is a listener for that topic.
>>>> 
>>>> Of course the first thought is, is the Connection started?  Yeah I
>>>> verified that.  In fact I can send messages to the topic via the
>>>> web-based admin tool for ActiveMQ and the GUI receives them.
>>>> 
>>>> Thanks for any help you have,
>>>> Mark
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>> 
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>> 
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus


Re: message not getting delivered

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Oct 4, 2010 at 3:57 PM, Mark Webb <el...@gmail.com> wrote:
> Thanks.  I have things working now.
>
> It seems weird to me though that if in a Processor I take a message
> in, transform it into a newly created Message object that I should
> call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
> think of a Processor as taking "in" a message and then sending it
> "out", but it looks like that is not the case.  Just need to adjust
> the way I think about things.
>

You are not the only one. See this FAQ
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

>
>
> On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen <cl...@gmail.com> wrote:
>> See this FAQ
>> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>>
>> On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb <el...@gmail.com> wrote:
>>> I am sending messages through a Camel route in ActiveMQ.  My message
>>> reaches the end of the processing chain, and at the last processor I
>>> call exchange.setOut( newly created DefaultMessage ).  When I look at
>>> the admin page for ActiveMQ, the topic shows that there is a message
>>> to be dequeued.  It even says that there is a consumer connected to
>>> that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
>>> Consumer.setMessageListener.  So why are the messages not making their
>>> way to my GUI tool?  I am stumped as to why the messages sit in the
>>> topic and never leave if there is a listener for that topic.
>>>
>>> Of course the first thought is, is the Connection started?  Yeah I
>>> verified that.  In fact I can send messages to the topic via the
>>> web-based admin tool for ActiveMQ and the GUI receives them.
>>>
>>> Thanks for any help you have,
>>> Mark
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: message not getting delivered

Posted by Mark Webb <el...@gmail.com>.
Thanks.  I have things working now.

It seems weird to me though that if in a Processor I take a message
in, transform it into a newly created Message object that I should
call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
think of a Processor as taking "in" a message and then sending it
"out", but it looks like that is not the case.  Just need to adjust
the way I think about things.



On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen <cl...@gmail.com> wrote:
> See this FAQ
> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>
> On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb <el...@gmail.com> wrote:
>> I am sending messages through a Camel route in ActiveMQ.  My message
>> reaches the end of the processing chain, and at the last processor I
>> call exchange.setOut( newly created DefaultMessage ).  When I look at
>> the admin page for ActiveMQ, the topic shows that there is a message
>> to be dequeued.  It even says that there is a consumer connected to
>> that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
>> Consumer.setMessageListener.  So why are the messages not making their
>> way to my GUI tool?  I am stumped as to why the messages sit in the
>> topic and never leave if there is a listener for that topic.
>>
>> Of course the first thought is, is the Connection started?  Yeah I
>> verified that.  In fact I can send messages to the topic via the
>> web-based admin tool for ActiveMQ and the GUI receives them.
>>
>> Thanks for any help you have,
>> Mark
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Re: message not getting delivered

Posted by Claus Ibsen <cl...@gmail.com>.
See this FAQ
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb <el...@gmail.com> wrote:
> I am sending messages through a Camel route in ActiveMQ.  My message
> reaches the end of the processing chain, and at the last processor I
> call exchange.setOut( newly created DefaultMessage ).  When I look at
> the admin page for ActiveMQ, the topic shows that there is a message
> to be dequeued.  It even says that there is a consumer connected to
> that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
> Consumer.setMessageListener.  So why are the messages not making their
> way to my GUI tool?  I am stumped as to why the messages sit in the
> topic and never leave if there is a listener for that topic.
>
> Of course the first thought is, is the Connection started?  Yeah I
> verified that.  In fact I can send messages to the topic via the
> web-based admin tool for ActiveMQ and the GUI receives them.
>
> Thanks for any help you have,
> Mark
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus