pypz.plugins.rmq_io.utils module
- class pypz.plugins.rmq_io.utils.MessageConsumer(consumer_name: str, max_poll_record: int | None = 1, connection: Connection | None = None, *args, **kwargs)
Bases:
_MessagingBase
- _on_message_received(message: Message) None
- _retrieved_data_messages: Queue
This list stores the messages pushed by the server. Its size shall never exceed the max_poll_records configuration.
- commit_messages()
- get_available_record_count() int
- has_records() bool
- poll(timeout: float | None = 0) list[str | bytes]
- subscribe(queue_name: str, arguments: Any = None) None
- unsubscribe(queue_name: str) None
- class pypz.plugins.rmq_io.utils.MessageProducer(connection: Connection | None = None, *args, **kwargs)
Bases:
_MessagingBase
- publish(message: str | bytes, queue_name: str = '', exchange_name: str = '')
- class pypz.plugins.rmq_io.utils._MessagingBase(connection: Connection | None = None, *args, **kwargs)
Bases:
object
- _channel: Channel
Lightweight virtual channel initialized over the physical connection
- close() None
- pypz.plugins.rmq_io.utils.is_exchange_existing(exchange_name: str, exchange_type: str, channel: Channel)
- pypz.plugins.rmq_io.utils.is_queue_existing(queue_name: str, channel: Channel)