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
ack(multiple: bool = False) -> None
Asynchronously acknowledge a message.
PARAMETER | DESCRIPTION |
multiple | Whether to acknowledge multiple messages at once. Defaults to False. TYPE: bool DEFAULT: False |
Source code in faststream/rabbit/test.py
| async def ack(self, multiple: bool = False) -> None:
"""Asynchronously acknowledge a message.
Args:
multiple (bool, optional): Whether to acknowledge multiple messages at once. Defaults to False.
Returns:
None
"""
pass
|
nack async
nack(multiple: bool = False, requeue: bool = True) -> None
Nack the message.
PARAMETER | DESCRIPTION |
multiple | Whether to nack multiple messages. Default is False. TYPE: bool DEFAULT: False |
requeue | Whether to requeue the message. Default is True. TYPE: bool DEFAULT: True |
Source code in faststream/rabbit/test.py
| async def nack(self, multiple: bool = False, requeue: bool = True) -> None:
"""Nack the message.
Args:
multiple: Whether to nack multiple messages. Default is False.
requeue: Whether to requeue the message. Default is True.
Returns:
None
"""
pass
|
reject async
reject(requeue: bool = False) -> None
Rejects a task.
PARAMETER | DESCRIPTION |
requeue | Whether to requeue the task if it fails (default: False) TYPE: bool DEFAULT: False |
Source code in faststream/rabbit/test.py
| async def reject(self, requeue: bool = False) -> None:
"""Rejects a task.
Args:
requeue: Whether to requeue the task if it fails (default: False)
Returns:
None
"""
pass
|