def fire(self, name, operation, args=None, **kwargs):
        """Send a message without waiting for a reply

        @param name: name of destination service queue
        @param operation: name of service operation to invoke
        @param args: dictionary of keyword args to pass to operation.
                     Use this OR kwargs.
        @param kwargs: additional args to pass to operation
        """

        if args:
            if kwargs:
                raise TypeError("specify args dict or keyword arguments, not both")
        else:
            args = kwargs

        d = dict(op=operation, args=args)
        headers = {'sender': self.add_sysname(self.name)}

        dest = self.add_sysname(name)

        def _fire(channel):
            with Producer(channel) as producer:
                producer.publish(d, routing_key=dest,
                    headers=headers, serializer=self._serializer,
                    exchange=self._exchange, declare=[self._exchange])

        log.debug("sending message to %s", dest)
        with connections[self._pool_conn].acquire(block=True) as conn:
            _, channel = self.ensure(conn, _fire)
            conn.maybe_close_channel(channel)
def fire ( self , name , operation , args = None , ** kwargs ) : if args : if kwargs : raise TypeError ( "specify args dict or keyword arguments, not both" ) else : args = kwargs d = dict ( op = operation , args = args ) headers = { 'sender' : self . add_sysname ( self . name ) } dest = self . add_sysname ( name ) def _fire ( channel ) : with Producer ( channel ) as producer : producer . publish ( d , routing_key = dest , headers = headers , serializer = self . _serializer , exchange = self . _exchange , declare = [ self . _exchange ] ) log . debug ( "sending message to %s" , dest ) with connections [ self . _pool_conn ] . acquire ( block = True ) as conn : _ , channel = self . ensure ( conn , _fire ) conn . maybe_close_channel ( channel )
Send a message without waiting for a reply

        @param name: name of destination service queue
        @param operation: name of service operation to invoke
        @param args: dictionary of keyword args to pass to operation.
                     Use this OR kwargs.
        @param kwargs: additional args to pass to operation