fcrepo-exts / fcrepo-camel-toolbox

A collection of ready-to-use messaging applications with fcrepo-camel
Apache License 2.0
13 stars 26 forks source link

Enable graceful shutdown #184

Closed claussni closed 2 years ago

claussni commented 2 years ago

What does this Pull Request do?

Changes the busy-wait pattern from sleep to JVM hint, allowing the JVM to optimize processor usage. Adds a shutdown hook to allow Spring to shutdown the Camel context if the application receives a termination signal.

What's new?

How should this be tested?

Run and stop the application. Should yield Camel shutdown messages in the log.

Interested parties

@dbernstein

pwinckles commented 2 years ago

Very cool! I was not aware of that feature