NatsParser
faststream.nats.parser.NatsParser #
NatsParser(is_js: bool)
A class to parse NATS messages.
Initialize the NATS parser.
PARAMETER | DESCRIPTION |
---|---|
is_js | Whether the parser is for JetStream. TYPE: |
Source code in faststream/nats/parser.py
decode_message async
#
decode_message(
msg: Union[StreamMessage[Msg], StreamMessage[List[Msg]]]
) -> Union[List[DecodedMessage], DecodedMessage]
Source code in faststream/nats/parser.py
parse_message async
#
parse_message(
message: Union[Msg, List[Msg]],
*,
path: Optional[AnyDict] = None
) -> Union[StreamMessage[Msg], StreamMessage[List[Msg]]]