Changes for clean shutdown in Relay Server and producers