Hi All, Not sure I understand the issue fully, but I have scheduled route with this config (it's throttled as well):
CronScheduledRoutePolicy emailSchedulingPolicy = new CronScheduledRoutePolicy(); emailSchedulingPolicy.setRouteStartTime(emailNotificationsStartSchedule); emailSchedulingPolicy.setRouteStopTime(emailNotificationsStopSchedule); Processor exceptionLoggingProcessor = (exchange) -> logger.error("EmailNotificationRoute Error handled in camel.", exchange.getProperty(Exchange.EXCEPTION_CAUGHT)); setErrorHandlerBuilder(deadLetterChannel(deadLetterQueue) .onExceptionOccurred(exceptionLoggingProcessor)); onException(Exception.class) .logExhaustedMessageHistory(true) .useOriginalMessage(); from(emailNotificationInputEndpoint) .routeId(EMAIL_NOTIFICATIONS).routePolicy(emailSchedulingPolicy).autoStartup(autoStartup) .filter(notificationFilterPredicate) .throttle(maxEmailNotificationsThroughput) .timePeriodMillis(timePeriodMillisForThrottle) .process(emailNotificationProcessor) .to(emailNotificationOutEndpoint) .end(); The schedule is like this: startSchedule: 0 0 10 ? * TUE-FRI,SUN * stopSchedule: 0 0 15 ? * TUE-FRI,SUN * So at 3pm the thing did shut down as expected but there was an error thrown in the logs (only thing I can see going wrong in the logs): 2019-11-05 15:00:11,358 [Camel (camel-1) thread #163 - ShutdownTask] ERROR o.a.c.c.r.RabbitConsumer - Thread Interrupted! The consumer config is this: rabbitmq://vm1/emailnotificationExchange?connectionFactory=rabbitConnectionFactory&autoDelete=false&queue=emailnotificationQueue&exchangeType=topic&autoAck=false&bridgeEndpoint=true&concurrentConsumers=9&threadPoolSize=9&channelPoolMaxSize=9&prefetchCount=1&prefetchEnabled=true&requestTimeout=90000&addresses=vm1,vm2,vm3 It's a clustered environment with the vm3 being a federated node. When the route shut down this happened: [cid:image001.png@01D593F1.8F4BD250] All of the 2k+ messages got somehow ack'd even though I have autoAck=false and this doesn't happen on a normal shutdown of the application. Am I missing something here, anyone would be able to explain why that could be happening? I'm a bit at a loss here. I was expecting the remaining messages to be just left on the queue after the route shut down (as prefetch is set to be only 1). Best Regards and Thanks, 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 are underwritten by Zurich Life Assurance plc. Vhi Healthcare is tied to Collinson Insurance Solutions Europe Limited for MultiTrip Travel Insurance and Vhi Dental Insurance which are underwritten by Great Lakes Insurance SE and for Vhi International Health Insurance which is underwritten by Collinson Insurance Europe 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 Solutions Europe Limited le haghaidh Árachas Taistil Ilturais agus Árachas Fiaclóireachta de chuid Vhi atá frithgheallta ag Great Lakes Insurance SE agus le haghaidh Árachas Sláinte Idirnáisiúnta de chuid Vhi atá frithgheallta ag Collinson Insurance Europe 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.