faust.types.tuples

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

Alias for field number 0

partition

Alias for field number 1

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

Alias for field number 0

partition

Alias for field number 1

topic_partition

Alias for field number 2

offset

Alias for field number 3

timestamp

Alias for field number 4

timestamp_type

Alias for field number 5

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

Alias for field number 0

key

Alias for field number 1

value

Alias for field number 2

partition

Alias for field number 3

timestamp

Alias for field number 4

headers

Alias for field number 5

key_serializer

Alias for field number 6

value_serializer

Alias for field number 7

callback

Alias for field number 8

topic

Alias for field number 9

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.

stream_meta

Monitor stores timing information for every stream processing this message here. It’s stored as:

 messsage.stream_meta[id(stream)] = {
     'time_in': float,
     'time_out': float,
     'time_total': float,
}
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.

use_tracking = True
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