def on_stop ( self ) : LOGGER . debug ( "zeromq.Publisher.on_stop" ) self . zmqsocket . close ( ) self . zmqcontext . destroy ( )
python pika stop consume
stop publisher
def on_stop(self):
        """
        stop publisher
        """
        LOGGER.debug("zeromq.Publisher.on_stop")
        self.zmqsocket.close()
        self.zmqcontext.destroy()