You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by udaykumarjonna <uj...@csc.com> on 2015/06/10 14:15:04 UTC

DeadLetterQueue -- Access the object before shutDown

Hi All  ,

 I have a requirement where i am submitting some  sort of  data to some
application  ,where any exception occurs  it redirects to  Dead Letter queue
where it is configured  to retry of submitting  for some predefined  times .

Problem is like when any server restart happens in between ,the
deadLetterQueue will be  empty and we are  missing the information about the
unsuccessful submitted  records  .

Is there any way to  access deadLetterQueue list of objectd which are in
queue  before camel cotext is shutting down .


Thanks  
Uday 



--
View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DeadLetterQueue -- Access the object before shutDown

Posted by Claus Ibsen <cl...@gmail.com>.
There is a getPendingRedeliveryCount() on the error handler api /
mbean you can use to know if there is anyone pending.

And then there is the regular inflight repository as well.
org.apache.camel.spi.InflightRepository

On Tue, Oct 27, 2015 at 8:10 AM, udaykumarjonna <uj...@csc.com> wrote:
> Hi Claus ,
>
>
> Any Update  on the issue  which i posted  how to access  in-flight repo
> while shutting  down
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069p5773086.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Re: DeadLetterQueue -- Access the object before shutDown

Posted by udaykumarjonna <uj...@csc.com>.
Hi Claus ,


Any Update  on the issue  which i posted  how to access  in-flight repo
while shutting  down



--
View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069p5773086.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DeadLetterQueue -- Access the object before shutDown

Posted by udaykumarjonna <uj...@csc.com>.
Hi Claus ,


Can u please add some example ,how we can configure inflightRepository and 
how to access the class before shuttingdown the context  . 


Thanks 
uday  



--
View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069p5768466.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DeadLetterQueue -- Access the object before shutDown

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

You can access the inflight repository, it has a list of all the
exchanges that are inflight.

But afair we dont have a public api that allows end users access to
the pending exchanges on the DLC.

We may want to expose some api on the management layer in
ManagedErrorHandlerMBean, so end users can access that way.

I logged a ticket
https://issues.apache.org/jira/browse/CAMEL-8873


On Mon, Jun 15, 2015 at 10:29 AM, udaykumarjonna <uj...@csc.com> wrote:
> Yes . i have to report the pending cases which are in queue,As the server
> restarted those cases wont be available in the queue fro resubmitting
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069p5768244.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: DeadLetterQueue -- Access the object before shutDown

Posted by udaykumarjonna <uj...@csc.com>.
Yes . i have to report the pending cases which are in queue,As the server
restarted those cases wont be available in the queue fro resubmitting 



--
View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069p5768244.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DeadLetterQueue -- Access the object before shutDown

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

With dead letter queue, do you mean that Camel is currently handling
redelivery and that those messages are queued because the redelivery
has some delays and are therefore waiting for next attempt. And that
during shutdown you want to "know and access those pending messages" ?


On Mon, Jun 15, 2015 at 8:05 AM, udaykumarjonna <uj...@csc.com> wrote:
> Hi Claus ,
>
>  I'm using DeadLetterChannel .Please find my configuration
>
>   <errorHandler id="retryHandler" type="DeadLetterChannel"
> onRedeliveryRef="redeliveryLogger" deadLetterUri="direct:email-error"
> transactionManagerRef="">
>                 <redeliveryPolicy maximumRedeliveries="{{standardRetryLimit}}"
> redeliveryDelay="{{standardRetryIntervalMs}}"   logRetryAttempted="true"
> retryAttemptedLogLevel="WARN" />
>           </errorHandler>
>
> On any exception in my code  I'm handling the request to retryHandler
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069p5768227.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: DeadLetterQueue -- Access the object before shutDown

Posted by udaykumarjonna <uj...@csc.com>.
Hi Claus ,

 I'm using DeadLetterChannel .Please find my configuration   

  <errorHandler id="retryHandler" type="DeadLetterChannel" 
onRedeliveryRef="redeliveryLogger" deadLetterUri="direct:email-error"
transactionManagerRef="">
	  	<redeliveryPolicy maximumRedeliveries="{{standardRetryLimit}}"
redeliveryDelay="{{standardRetryIntervalMs}}"   logRetryAttempted="true"
retryAttemptedLogLevel="WARN" />
	  </errorHandler>

On any exception in my code  I'm handling the request to retryHandler



--
View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069p5768227.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DeadLetterQueue -- Access the object before shutDown

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

What kind of DLQ are you using?

On Wed, Jun 10, 2015 at 2:15 PM, udaykumarjonna <uj...@csc.com> wrote:
> Hi All  ,
>
>  I have a requirement where i am submitting some  sort of  data to some
> application  ,where any exception occurs  it redirects to  Dead Letter queue
> where it is configured  to retry of submitting  for some predefined  times .
>
> Problem is like when any server restart happens in between ,the
> deadLetterQueue will be  empty and we are  missing the information about the
> unsuccessful submitted  records  .
>
> Is there any way to  access deadLetterQueue list of objectd which are in
> queue  before camel cotext is shutting down .
>
>
> Thanks
> Uday
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DeadLetterQueue-Access-the-object-before-shutDown-tp5768069.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/