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

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

key_serializer

Alias for field number 4

value_serializer

Alias for field number 5

callback

Alias for field number 6

topic

Alias for field number 7

offset

Alias for field number 8

tp
ack(consumer: faust.types.tuples.ConsumerT) → None[source]
Return type:None
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, key: Union[bytes, NoneType], value: Union[bytes, NoneType], checksum: Union[bytes, NoneType], 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)[source]
topic
partition
offset
timestamp
timestamp_type
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
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
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