You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lilw <li...@gmail.com> on 2015/06/19 21:05:15 UTC

customizing recipientList

Hello,
I have a list of recipients, but I'm not sure what I could do to have the
available recipientList do the following:
- if one of my external endpoints is down, queue up messages for it and keep
retrying till the endpoint is finally available. 
- if one of my external endpoints is down, retry only that endpoint and not
the cluster of endpoins. 

I hope there is something in Camel already that I could use with my existing
Spring XML constructs.
Thanks a lot
lw




--
View this message in context: http://camel.465427.n5.nabble.com/customizing-recipientList-tp5768423.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: customizing recipientList

Posted by lilw <li...@gmail.com>.
I did start looking at the error handling framework. Right now I have
something in the spirit below, but I still am not sure, what would be the
best replacement recipientList or for  inOnly. 

<route id="doCompose">
    <filter>
        <aggregate>
            ........    
            <inOnly uri="activemq:doPost"/>		
        </aggregate>
    </filter>
</route>
<route id="doPost">
    <from uri="activemq:doPost?concurrentConsumers=1"/>
    <onException
        <exception> java.net.ConnectException</exception>
        <redeliveryPolicy maximumRedeliveries="-1"
delayPattern="1:1000;5:10000;10:30000"/>
        <handled>
                <constant>true</constant>
        </handled>
        <setHeader headerName="CamelExceptionCaught">
                <simple>Headers: ${headers} - ${exception.message}</simple>
        </setHeader>              
        <to uri="activemq:rdf-connection-fail"/>
        <log message="Error connecting to RDF repo body:${out.body}
exception message: ${exception.message} body:${exception.responseBody}"/>
    </onException>                      

    <onException>
            <exception>java.lang.Exception</exception>
            ....
    </onException>
    <setHeader headerName="CamelHttpMethod">
        <constant>POST</constant>
    </setHeader>
    <recipientList>                            
       
<simple>http://sesameServer.com:7171/repositories/repoQA/statements</simple>                                
    </recipientList>
</route>


 



--
View this message in context: http://camel.465427.n5.nabble.com/customizing-recipientList-tp5768423p5768481.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: customizing recipientList

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

You can use Camel's error handler to setup redelivery. Then it will
only retry that endpoint which was down.
http://camel.apache.org/error-handling-in-camel.html

Follow the links from that page. Although error handling is a more
hardcore topic then take extra time to study the docs / examples.

You can also find some blogs about error handling at
http://camel.apache.org/articles.html

And then the Camel books covers this too (in action and the cookbook book)
http://camel.apache.org/books.html

On Fri, Jun 19, 2015 at 9:05 PM, lilw <li...@gmail.com> wrote:
> Hello,
> I have a list of recipients, but I'm not sure what I could do to have the
> available recipientList do the following:
> - if one of my external endpoints is down, queue up messages for it and keep
> retrying till the endpoint is finally available.
> - if one of my external endpoints is down, retry only that endpoint and not
> the cluster of endpoins.
>
> I hope there is something in Camel already that I could use with my existing
> Spring XML constructs.
> Thanks a lot
> lw
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/customizing-recipientList-tp5768423.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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

Re: customizing recipientList

Posted by ravi narayanan <ge...@gmail.com>.
Is it advisable to store the messages in memory during redelivery for a
long time..if not can you please tell me what is the alternative...?

On Saturday, September 5, 2015, Claus Ibsen <cl...@gmail.com> wrote:

> Yes Camel's error handler stores the messages in memory when it does
> waits to do redeliveries.
>
>
> On Fri, Sep 4, 2015 at 11:35 PM, ravi narayanan <geekstuff24@gmail.com
> <javascript:;>> wrote:
> > Hi Claus,
> > I have a query in using redelivery policy.if my volume is huge and no of
> > data items in my payload is more is it advisable to use redelivery ,coz I
> > would assume the message will be stored in memory during retrial.
> >
> > On Thursday, June 25, 2015, Lambert, Michael <michael@michaellambert.com
> <javascript:;>>
> > wrote:
> >
> >> I'm
> >>
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2nd edition: http://www.manning.com/ibsen2
>

Re: customizing recipientList

Posted by Claus Ibsen <cl...@gmail.com>.
Yes Camel's error handler stores the messages in memory when it does
waits to do redeliveries.


On Fri, Sep 4, 2015 at 11:35 PM, ravi narayanan <ge...@gmail.com> wrote:
> Hi Claus,
> I have a query in using redelivery policy.if my volume is huge and no of
> data items in my payload is more is it advisable to use redelivery ,coz I
> would assume the message will be stored in memory during retrial.
>
> On Thursday, June 25, 2015, Lambert, Michael <mi...@michaellambert.com>
> wrote:
>
>> I'm
>>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Re: customizing recipientList

Posted by ravi narayanan <ge...@gmail.com>.
Hi Claus,
I have a query in using redelivery policy.if my volume is huge and no of
data items in my payload is more is it advisable to use redelivery ,coz I
would assume the message will be stored in memory during retrial.

On Thursday, June 25, 2015, Lambert, Michael <mi...@michaellambert.com>
wrote:

> I'm
>

Re: customizing recipientList

Posted by "Lambert, Michael" <mi...@michaellambert.com>.
I'm