Search code examples
jbossjmsapache-camelwildflyhawtio

How can I stop inflight exchanges in camel using something like hawtio?


Using JEE7, Wildfly 8, ActiveMQ 5, Camel 2.13.2.

While developing, occasionally tickets will get caught in some impossible circumstance and will retrying 5, 10 times, cluttering up the logs during development.

Or, alternatively, I'll need to reboot the application server and will have to wait 5 minutes for inflight exchanges to timeout.

I've started using hawtio and with the level of detail presented about Camel, it seems like I should be able to cancel/delete/flush/purge those and move on with my life.

There aren't many buttons to push. When I select a route, I can see a list of properties containing the offending inflight exchanges. But the "Destroy" button appears to only trigger the graceful shutdown.

Is there a way to purge/flush/delete tickets from hawtio? Any way at all?


Solution

  • You can lower the timeout from the default 300 seconds to a lower value.

    And if you use Camel 2.15.x onwards then hawtio has a new inflight exchanges sub tab, where you can see all the inflights. Though you cannot kill them.

    But there is no purge button, as the inflight exchanges are not like sitting still on a message queue you can drain. But they are actual live java threads doing work, so there is no single way of killing things cleanly.

    There is a ticket in JIRA to have a kill button that attempts a shutdown but will do this quicker, and potentially leave some threads still inflight that may cause side effects due not being able to shutdown graceful.