def unsubscribe(self, frame):
        """
        Handle the UNSUBSCRIBE command: Removes this connection from destination.
        """
        dest = frame.headers.get('destination')
        if not dest:
            raise ProtocolError('Missing destination for UNSUBSCRIBE command.')

        if dest.startswith('/queue/'):
            self.engine.queue_manager.unsubscribe(self.engine.connection, dest)
        else:
            self.engine.topic_manager.unsubscribe(self.engine.connection, dest)
def unsubscribe ( self , frame ) : dest = frame . headers . get ( 'destination' ) if not dest : raise ProtocolError ( 'Missing destination for UNSUBSCRIBE command.' ) if dest . startswith ( '/queue/' ) : self . engine . queue_manager . unsubscribe ( self . engine . connection , dest ) else : self . engine . topic_manager . unsubscribe ( self . engine . connection , dest )
Handle the UNSUBSCRIBE command: Removes this connection from destination.