'Spring Integration informing remote systems before shutdown
I'm using Spring Integration (configured via XML) and I would like to inform remote systems before completing shutdown.
The Spring Integration based application uses TCP Channel Adapters and runs in a container. The TCP channels are long-lived. On container shutdown, Spring receives a SIGHUP, and current behaviour is that these connections are simply closed.
I would like to dispatch a shutdown information message to, and receive an ack from the channel, before termination of the Spring application completes.
Is there a good recipe for how to register logic to handle this messaging while also being able to hold off shutdown until it is complete?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
