...
However, most if not all processors in Kafka as of the moment does not have a Time
instance as a field in its implementations (or an internal clock). Thus, they cannot track time (not stream time but actual computer clock time). This unfortunately means that either a StreamThread somehow triggers the flush (in which case, we will have to check if the processor is really of type KTableSuppressProcessor)
or , and then things get messy) or we consider adding a local Time
instance in KTableSuppressProcessor
such that when process()
is called, we would check if the records in the buffer have expired. and have an additional process check for the record expiration.
If none of these approaches is ideal, then we might have to let the user trigger a manual flush. (In retrospect, if they want to use this suppression buffer flushing for testing, then this additional API is preferred).
...