apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
254 stars 188 forks source link

Camel debug is not working #6256

Open apupier opened 1 month ago

apupier commented 1 month ago

Bug description

jamesnetherton commented 1 month ago

Something similar was mentioned elsewhere recently.

It is likely related to CQ configuring NoShutdownStrategy in dev mode. It prohibits route suspension.

You can suppress it by setting a property like camel.main.shutdownTimeout=30.

apupier commented 1 month ago

calling mvn quarkus:dev -Pcamel.debug -Dcamel.main.shutdownTimeout=30 is effectively working. Thanks for the workaround.

What is the purpose of this NoShutdownStrategy in dev mode? And why would it prevent to suspend/stop routes?

Would it be possible to modify this strategy when the camel-quarkus-debug depdency is on the classpath?

jamesnetherton commented 1 month ago

What is the purpose of this NoShutdownStrategy in dev mode?

I think the original intent was that if you're running in dev mode, you're probably looking to iterate quickly. I.e you don't want hot reloading to take a long time due to waiting for inflight messages to complete etc.

And why would it prevent to suspend/stop routes?

Because it's effectively a noop implementation of ShutdownStrategy.

Would it be possible to modify this strategy when the camel-quarkus-debug depdency is on the classpath?

Yes, that should be possible. Or alternatively, we could implement suspend logic in NoShutdownStrategy (maybe by delegating to DefaultShutdownStrategy).