faust.types.tuples

class faust.types.tuples.TP(*args, **kwargs)[source]
property topic

Alias for field number 0

property partition

Alias for field number 1

class faust.types.tuples.RecordMetadata(*args, **kwargs)[source]
property topic

Alias for field number 0

property partition

Alias for field number 1

property topic_partition

Alias for field number 2

property offset

Alias for field number 3

property timestamp

Alias for field number 4

property timestamp_type

Alias for field number 5

class faust.types.tuples.PendingMessage(*args, **kwargs)[source]
property channel

Alias for field number 0

property key

Alias for field number 1

property value

Alias for field number 2

property partition

Alias for field number 3

property timestamp

Alias for field number 4

property headers

Alias for field number 5

property key_serializer

Alias for field number 6

property value_serializer

Alias for field number 7

property callback

Alias for field number 8

property topic

Alias for field number 9

property offset

Alias for field number 10

class faust.types.tuples.FutureMessage(message: faust.types.tuples.PendingMessage) → None[source]
set_result(result: faust.types.tuples.RecordMetadata) → None[source]

Mark the future done and set its result.

If the future is already done when this method is called, raises InvalidStateError.

Return type

None

class faust.types.tuples.Message(topic: str, partition: int, offset: int, timestamp: float, timestamp_type: int, headers: Union[List[Tuple[str, bytes]], Mapping[str, bytes], None], key: Optional[bytes], value: Optional[bytes], checksum: Optional[bytes], serialized_key_size: int = None, serialized_value_size: int = None, tp: faust.types.tuples.TP = None, time_in: float = None, time_out: float = None, time_total: float = None) → None[source]
use_tracking = False
topic
partition
offset
timestamp
timestamp_type
headers
key
value
checksum
serialized_key_size
serialized_value_size
acked
refcount
tp
tracked
time_in

Monotonic timestamp of when the consumer received this message.

time_out

Monotonic timestamp of when the consumer acknowledged this message.

time_total

Total processing time (in seconds), or None if the event is still processing.

ack(consumer: faust.types.tuples._ConsumerT, n: int = 1) → bool[source]
Return type

bool

on_final_ack(consumer: faust.types.tuples._ConsumerT) → bool[source]
Return type

bool

incref(n: int = 1) → None[source]
Return type

None

decref(n: int = 1) → int[source]
Return type

int

classmethod from_message(message: Any, tp: faust.types.tuples.TP) → faust.types.tuples.Message[source]
Return type

Message

span
class faust.types.tuples.ConsumerMessage(topic: str, partition: int, offset: int, timestamp: float, timestamp_type: int, headers: Union[List[Tuple[str, bytes]], Mapping[str, bytes], None], key: Optional[bytes], value: Optional[bytes], checksum: Optional[bytes], serialized_key_size: int = None, serialized_value_size: int = None, tp: faust.types.tuples.TP = None, time_in: float = None, time_out: float = None, time_total: float = None) → None[source]

Message type used by Kafka Consumer.

acked
checksum
headers
key
offset
partition
refcount
serialized_key_size
serialized_value_size
span
time_in
time_out
time_total
timestamp
timestamp_type
topic
tp
tracked
use_tracking = True
value
on_final_ack(consumer: faust.types.tuples._ConsumerT) → bool[source]
Return type

bool

faust.types.tuples.tp_set_to_map(tps: Set[faust.types.tuples.TP]) → MutableMapping[str, Set[faust.types.tuples.TP]][source]
Return type

MutableMapping[str, Set[TP]]

faust.types.tuples.MessageSentCallback

alias of typing.Callable