apache-nifigoogle-cloud-pubsub

How to publish evenType with Nifi ConsumeGCPubSub


We have set up a ConsumeGCPubSub processor in Nifi so that we get informed if files are added or deleted on our GCS bucket. This is working, however, in the messages that the processor is emitting, the 'eventType' attribute is missing.

The eventType is described in the Google pubsub doc, https://cloud.google.com/storage/docs/pubsub-notifications, and tells us if the pubsub notification was about a new file, or a deletion etc. We know that the pubsub subscription is publishing this attribute. It seems that the ConsumeGCPubSub is not including it in its output message. How can we make sure that it is included?

Just in case it matters, we are using Nifi ConsumeGCPubSub version 1.25.0


Solution

  • Found the answer, the eventType is published, but as a flow file attribute.