Spring Integration informing remote systems before shutdown

Viewed 39

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?

0 Answers
Related