Hi All,

Hopefully someone here can educate me on the below matter.

Here is a rather long-winded description of the issue: 
https://stackoverflow.com/questions/51875646/apache-camel-with-rabbitmq-messages-in-temp-reply-queue-not-being-acked-when-au

The essence of it is that in an InOut route with autoAck=false on the main 
queue the messages on the temporary reply queue are not being acked even though 
they are being fetched as indicated by the prefetch setting and the amount of 
messages in an un-acked state on the temp queues.

If I set the autoAck=true then it works fine but in that case I'm risking 
losing messages and that's not what I want (we switched from SEDA to RabbitMQ 
for this reason among others).
If I set the exchange pattern to InOnly then it works fine as well as the route 
then doesn't need the temp queue for the reply. That unfortunately causes a 
race condition in this scenario (outputEmailEndpoint and outputArchiveEndpoint 
get the message at the same time, but email route needs to finish first before 
it can be archived):

rest(restEndpoint).post(postEndpoint)
                  .type(MyRequest.class)
                  .route()
                  .startupOrder(Integer.MAX_VALUE - 2)
                                  .process(this::process)
                                  .choice()
                                    
.when(header(DELIVERYSTATUS_HEADER).isEqualTo(Status.COMPLETED)).to(outputEmailEndpoint,
 outputArchiveEndpoint)

I'd also like to be sending the correct response status to the REST client 
calling this service and at the moment that doesn't quite work too well as the 
un-acked messages start blocking the route or the response will be sent before 
email route has finished.

I'm only new to Camel so I might be missing something very obvious here but the 
last few days of searching around and trying various config options haven't 
really got me anywhere further.


Thanks and Best Regards,
Valdis
Vhi Group DAC (Vhi) is a holding company for insurance and healthcare services, 
which include Vhi Healthcare DAC, Vhi Insurance DAC, Vhi Health Services DAC 
and Vhi Investments DAC. Vhi Healthcare DAC trading as Vhi Healthcare and Vhi 
Insurance DAC trading as Vhi Insurance are regulated by the Central Bank of 
Ireland. Vhi Healthcare is tied to Vhi Insurance DAC for health insurance in 
Ireland which is underwritten by Vhi Insurance DAC. Vhi Healthcare is tied to 
Zurich Life Assurance plc for Vhi Life Term Insurance and Vhi Mortgage 
Protection which is underwritten by Zurich Life Assurance plc. Vhi Healthcare 
is tied to Collinson Insurance Services Limited for MultiTrip Travel Insurance, 
Backpacker Travel Insurance and Vhi Dental Insurance which are underwritten by 
Great Lakes Insurance SE, UK branch and for Vhi Canada Cover and Vhi 
International Health Insurance which are underwritten by Astrenska Insurance 
Limited. For more information about the Vhi Group please go to: 
https://www.vhi.ie/about-vhi.


Tá Vhi Group DAC (Vhi) ina chuideachta sealbhaíochta le haghaidh seirbhísí 
árachais agus seirbhísí cúram sláinte, lena n-áirítear Vhi Healthcare DAC, Vhi 
Insurance DAC, Vhi Health Services DAC agus Vhi Investments DAC. Déanann Banc 
Ceannais na hÉireann rialáil ar Vhi Healthcare DAC, ag trádáil dó mar Vhi 
Healthcare, agus ar Vhi Insurance DAC, ag trádáil dó mar Vhi Insurance. Tá Vhi 
Healthcare ceangailte le Vhi Insurance DAC le haghaidh árachas sláinte in 
Éirinn, rud atá frithgheallta ag Vhi Insurance DAC. Tá Vhi Healthcare 
ceangailte le Zurich Life Assurance plc le haghaidh Árachais Saoil de chuid Vhi 
agus Árachas Cosanta Morgáiste de chuid Vhi atá frithgheallta ag Zurich Life 
Assurance plc. Tá Vhi Healthcare ceangailte le Collinson Insurance Services 
Limited le haghaidh Árachas Taistil Ilturais agus Turasóirí Mála Droma agus 
Árachas Fiaclóireachta de chuid Vhi atá frithgheallta ag Great Lakes Insurance 
SE, UK branch agus le haghaidh Clúdach Cheanada de chuid Vhi agus Árachas 
Sláinte Idirnáisiúnta de chuid Vhi atá frithgheallta ag Astrenska Insurance 
Limited. Chun tuilleadh faisnéise a fháil faoi Ghrúpa Vhi, tabhair cuairt ar: 
https://www.vhi.ie/about-vhi.

This e-mail and any files transmitted with it contain information which may be 
confidential and which may also be privileged and is intended solely for the 
use of the individual or entity to whom it is addressed. Unless you are the 
intended recipient you may not copy or use it, or disclose it to anyone else. 
Any opinions expressed are that of the individual and not necessarily that of 
the Vhi Group. If you have received this e-mail in error please notify the 
sender by return.







Reply via email to