This patch aims to minimize the downtime for producers and make the
shutdown process generally more robust. The flow is now the following:
1) shutdown signal is received
2) manager: stop accepting new consumers and close existing consumers
3) server: stop accepting new producers and close existing producers
5) shutdown and restart
This way, producer downtime is reduced to the time elapsed between (3)
and (5), which should be less than a second. Nevertheless, clients
should still have sane retry defaults configured anyway, because some
downtime will still occur.
Also added a hard timeout of 5 seconds around the shutdown process.
This patch aims to minimize the downtime for producers and make the shutdown process generally more robust. The flow is now the following:
1) shutdown signal is received 2) manager: stop accepting new consumers and close existing consumers 3) server: stop accepting new producers and close existing producers 5) shutdown and restart
This way, producer downtime is reduced to the time elapsed between (3) and (5), which should be less than a second. Nevertheless, clients should still have sane retry defaults configured anyway, because some downtime will still occur.
Also added a hard timeout of 5 seconds around the shutdown process.