public final class CamelShutdownHook extends Object implements Runnable, org.apache.camel.CamelContextAware
CamelContext before the
ActiveMQ broker is shut down. This is sometimes important as if the broker is
shutdown before Camel there could be a loss of data due to inflight exchanges
not yet completed.
This hook can be added to ActiveMQ configuration (activemq.xml) as in
the following example:
<bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.camel.CamelShutdownHook" />
| Constructor and Description |
|---|
CamelShutdownHook(org.apache.activemq.broker.BrokerService brokerService) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.CamelContext |
getCamelContext() |
void |
run() |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
@Autowired public CamelShutdownHook(org.apache.activemq.broker.BrokerService brokerService)
public org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwareCopyright © 2005–2018 The Apache Software Foundation. All rights reserved.