Hi

Oh to not block on the jms consumer you need to configure it to
asyncConsumer=true. Then when the error handler does schedule a async
redelivery, the consumer thread is not blocked, and can work on the
next message.

But again long lasting transactions and redeliveries is likely better
if the broker can schedule them.
If not make sure to give it a bit of test spin to ensure it works well
with your OracleAQ broker.



On Sat, Mar 21, 2015 at 6:55 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> Hi
>
> You should favor using the brokers redelivery settings instead of
> Camel. Then you dont have blocked threads, or long running
> transactions. Using Camel is better for short term redeliveries.
>
> OracleAQ from such a big player must surely have some way of
> configuring redelivery.
>
> Apache ActiveMQ do have that.
> http://activemq.apache.org/redelivery-policy.html
>
> On Fri, Mar 20, 2015 at 5:40 PM, Frank Ertl
> <frank.e...@f-i-solutions-plus.de> wrote:
>> Hi guys,
>>
>> we have the following scenario:
>>
>> Orders are stored to an Oracle AQ queue from where we read the messages by a
>> JmsComponent and deliver the content to a webservice.
>> If anything goes wrong we should redeliver the messages with exponential
>> backoff starting with a delay of 15 minutes.
>>
>>     errorHandler(deadLetterChannel(MANUAL_QUEUE_CHANNEL_URI)
>>         .asyncDelayedRedelivery()
>>         .maximumRedeliveries(8)
>>         .redeliveryDelay(900000)
>>         .onRedelivery(waitingStateProcessor)
>>         .backOffMultiplier(2)
>>         .retryAttemptedLogLevel(LoggingLevel.INFO)
>>         .retriesExhaustedLogLevel(LoggingLevel.ERROR));
>>
>>         from("jms:order_queue")
>>         .process(orderProcessor)
>>         .to("cxf:bean:orderWS");
>>
>> Because we don't want to loose any orders in case of a server crash the
>> JsmComponent is set to transacted. Reading the documentation I came to the
>> conclusion that asyncDelayedRedelivery() does not work for transacted
>> routes, which proofs to be true as the threads are blocked when the failed
>> messages reaches the maximum threadcount.
>>
>> Is there another way with camel to do the required redelivery without
>> blocking the threads? Using a timer?
>>
>> Regards,
>> Frank
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/How-to-avoid-blocking-threads-in-JmsComponent-with-Oracle-AQ-tp5764487.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cib...@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/



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@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/

Reply via email to