KafkaMessage
faststream.confluent.message.KafkaMessage #
KafkaMessage(*args: Any, consumer: ConsumerProtocol, is_manual: bool = False, **kwargs: Any)
Bases: StreamMessage[Message]
Represents a Kafka message in the FastStream framework.
This class extends StreamMessage
and is specialized for handling Kafka ConsumerRecord objects.
METHOD | DESCRIPTION |
---|---|
ack | Acknowledge the Kafka message. |
nack | Negative acknowledgment of the Kafka message. |
reject | Reject the Kafka message. |
Constructor method for the KafkaMessage class.
PARAMETER | DESCRIPTION |
---|---|
*args | Additional positional arguments. TYPE: |
consumer | The Kafka consumer that received the message. TYPE: |
is_manual | Whether the consumer is manual or not. TYPE: |
**kwargs | Additional keyword arguments. TYPE: |
Source code in faststream/confluent/message.py
correlation_id class-attribute
instance-attribute
#
message_id class-attribute
instance-attribute
#
ack async
#
ack(**kwargs: Any) -> None
Acknowledge the Kafka message.
PARAMETER | DESCRIPTION |
---|---|
**kwargs | Additional keyword arguments. TYPE: |
RETURNS | DESCRIPTION |
---|---|
None | This method does not return a value. TYPE: |