I have a simple pipeline that reads from a Pub Sub topic and writes to BigQuery. I would like to introduce a 5 minute delay between reading the message from the topic and writing it to BQ.
I thought I could do this using a trigger, similarly to this below, however the message still goes straight through with no delay.
PCollection<PubsubMessage> windowed_inputEvents =
inputEvents.apply(
Window.<PubsubMessage>into(FixedWindows.of(Duration.standardMinutes(1)))
.triggering(
AfterProcessingTime
.pastFirstElementInPane()
.plusDelayOf(Duration.standardMinutes(5)))
.withAllowedLateness(Duration.standardMinutes(1))
.discardingFiredPanes());
Is it possible to create such a delay using triggers?
Thanks