RedisBatchListMessage (
raw_message ,
body ,
headers = dict (),
batch_headers = list (),
path = dict (),
content_type = None ,
reply_to = "" ,
message_id = gen_cor_id (),
correlation_id = gen_cor_id (),
_source_type = Consume ,
)
Bases: StreamMessage [BatchListMessage ]
StreamMessage for single List message.
decoded_body instance-attribute
raw_message instance-attribute
path class-attribute
instance-attribute
content_type class-attribute
instance-attribute
reply_to class-attribute
instance-attribute
message_id class-attribute
instance-attribute
correlation_id class-attribute
instance-attribute
processed class-attribute
instance-attribute
processed = field ( default = False , init = False )
committed class-attribute
instance-attribute
committed = field ( default = None , init = False )
ack async
Source code in faststream/broker/message.py
async def ack ( self ) -> None :
if not self . committed :
self . committed = AckStatus . acked
nack async
Source code in faststream/broker/message.py
async def nack ( self ) -> None :
if not self . committed :
self . committed = AckStatus . nacked
reject async
Source code in faststream/broker/message.py
async def reject ( self ) -> None :
if not self . committed :
self . committed = AckStatus . rejected
decode async
Serialize the message by lazy decoder.
Source code in faststream/broker/message.py
async def decode ( self ) -> Optional [ "DecodedMessage" ]:
"""Serialize the message by lazy decoder."""
# TODO: make it lazy after `decoded_body` removed
return self . _decoded_body