mistral.engine.rpc_backend.kombu package

Submodules

mistral.engine.rpc_backend.kombu.base module

class mistral.engine.rpc_backend.kombu.base.Base

Bases: object

Base class for Client and Server.

mistral.engine.rpc_backend.kombu.kombu_client module

class mistral.engine.rpc_backend.kombu.kombu_client.KombuRPCClient(conf)

Bases: mistral.engine.rpc_backend.base.RPCClient, mistral.engine.rpc_backend.kombu.base.Base

async_call(ctx, method, target=None, **kwargs)
sync_call(ctx, method, target=None, **kwargs)

mistral.engine.rpc_backend.kombu.kombu_hosts module

class mistral.engine.rpc_backend.kombu.kombu_hosts.KombuHosts(conf)

Bases: object

get_host()
get_hosts()

mistral.engine.rpc_backend.kombu.kombu_listener module

class mistral.engine.rpc_backend.kombu.kombu_listener.KombuRPCListener(connections, callback_queue)

Bases: kombu.mixins.ConsumerMixin

add_listener(correlation_id)
get_consumers(Consumer, channel)
get_result(correlation_id, timeout)
on_connection_error(exc, interval)
on_message(response, message)

Callback on response.

This method is automatically called when a response is incoming and decides if it is the message we are waiting for - the message with the result.

Parameters:
  • response – the body of the amqp message already deserialized by kombu
  • message – the plain amqp kombu.message with additional information
remove_listener(correlation_id)
start()

mistral.engine.rpc_backend.kombu.kombu_server module

class mistral.engine.rpc_backend.kombu.kombu_server.KombuRPCServer(conf)

Bases: mistral.engine.rpc_backend.base.RPCServer, mistral.engine.rpc_backend.kombu.base.Base

publish_message(body, reply_to, corr_id, res_type='response')
register_endpoint(endpoint)
run(executor='blocking')

Start the server.

stop(graceful=False)
wait()

Module contents