FakeProducer
faststream.rabbit.testing.FakeProducer #
Bases: AioPikaFastProducer
A fake RabbitMQ producer for testing purposes.
This class extends AioPikaFastProducer and is used to simulate RabbitMQ message publishing during tests.
Source code in faststream/rabbit/testing.py
publish async
#
publish(message, exchange=None, *, correlation_id='', routing_key='', mandatory=True, immediate=False, timeout=None, rpc=False, rpc_timeout=30.0, raise_timeout=False, persist=False, reply_to=None, headers=None, content_type=None, content_encoding=None, priority=None, expiration=None, message_id=None, timestamp=None, message_type=None, user_id=None, app_id=None)
Publish a message to a RabbitMQ queue or exchange.
Source code in faststream/rabbit/testing.py
request async
#
request(message='', exchange=None, *, correlation_id='', routing_key='', mandatory=True, immediate=False, timeout=None, persist=False, headers=None, content_type=None, content_encoding=None, priority=None, expiration=None, message_id=None, timestamp=None, message_type=None, user_id=None, app_id=None)
Publish a message to a RabbitMQ queue or exchange.