I have a need to batch the events in a Faust stream, so I'm using the take()
method. However, I would also like to access the header message, particularly a timestamp.
Ordinarily you would access the header using:
async for event in stream.events()
and then call the header using event.header
, but since we're using the take method:
async for event in stream.take(500, 1)
we can't seem to get access to the raw message. Any idea on how to get this? We're just trying to have a means of highlighting a slow section of the pipeline by monitoring timestamps of each as a header, rather than adding it as a part of the value
part of the sent message.
Is there another raw timestamp that's 'hidden' but accessible that I've missed?
EDIT
Using faust-streaming==0.8.4 so it's definitely up to date