PatchedMessage
faststream.rabbit.test.PatchedMessage #
Bases: IncomingMessage
Patched message class for testing purposes.
This class extends aio_pika's IncomingMessage class and is used to simulate RabbitMQ message handling during tests.
ack async
#
Asynchronously acknowledge a message.
PARAMETER | DESCRIPTION |
---|---|
multiple | Whether to acknowledge multiple messages at once. Defaults to False. TYPE: |
RETURNS | DESCRIPTION |
---|---|
None | None |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/rabbit/test.py
nack async
#
Nack the message.
PARAMETER | DESCRIPTION |
---|---|
multiple | Whether to nack multiple messages. Default is False. TYPE: |
requeue | Whether to requeue the message. Default is True. TYPE: |
RETURNS | DESCRIPTION |
---|---|
None | None |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/rabbit/test.py
reject async
#
Rejects a task.
PARAMETER | DESCRIPTION |
---|---|
requeue | Whether to requeue the task if it fails (default: False) TYPE: |
RETURNS | DESCRIPTION |
---|---|
None | None |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)