ocrd_network.rabbitmq_utils.connector module¶
The source code in this file is adapted by reusing some part of the source code from the official RabbitMQ documentation.
- class ocrd_network.rabbitmq_utils.connector.RMQConnector(host: str = 'localhost', port: int = 5672, vhost: str = '/')[source]¶
Bases:
object
- static declare_and_bind_defaults(connection: BlockingConnection, channel: BlockingChannel) None [source]¶
- static open_blocking_connection(credentials: PlainCredentials, host: str = 'localhost', port: int = 5672, vhost: str = '/') BlockingConnection [source]¶
- static exchange_bind(channel: BlockingChannel, destination_exchange: str, source_exchange: str, routing_key: str, arguments: Any | None = None) None [source]¶
- static exchange_declare(channel: BlockingChannel, exchange_name: str, exchange_type: str, passive: bool = False, durable: bool = False, auto_delete: bool = False, internal: bool = False, arguments: Any | None = None) None [source]¶
- static exchange_delete(channel: BlockingChannel, exchange_name: str, if_unused: bool = False) None [source]¶
- static exchange_unbind(channel: BlockingChannel, destination_exchange: str, source_exchange: str, routing_key: str, arguments: Any | None = None) None [source]¶
- static queue_bind(channel: BlockingChannel, queue_name: str, exchange_name: str, routing_key: str, arguments: Any | None = None) None [source]¶
- static queue_declare(channel: BlockingChannel, queue_name: str, passive: bool = False, durable: bool = False, exclusive: bool = False, auto_delete: bool = False, arguments: Any | None = None) None [source]¶
- static queue_delete(channel: BlockingChannel, queue_name: str, if_unused: bool = False, if_empty: bool = False) None [source]¶
- static queue_unbind(channel: BlockingChannel, queue_name: str, exchange_name: str, routing_key: str, arguments: Any | None = None) None [source]¶
- create_queue(queue_name: str, exchange_name: str | None = 'ocrd-network-default', exchange_type: str | None = 'direct', passive: bool = False) None [source]¶