-
Notifications
You must be signed in to change notification settings - Fork 101
Description
We are using the relatively recent Java 11 Cloud Functions and following the quickstart tutorials.
Having used this PubSub library previously, I assumed that the following two libraries played well with each other:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.108.1</version>
</dependency>
<dependency>
<groupId>com.google.cloud.functions</groupId>
<artifactId>functions-framework-api</artifactId>
<version>1.0.1</version>
<scope>provided</scope>
</dependency>
This does NOT seem to be the case, i.e. the BackgroundFunction type parameter PubSubMessage MUST be a simple POJO and can not be the com.google.pubsub.v1.PubsubMessage class.
We were able to successfully deploy cloud functions with the type signature BackgroundFunction but found runtime failures where the PubsubMessage's field variables were not populated.
This is both a documentation request to clarify that this library should NOT be used with the new Java Cloud functions library, and/or a feature request to add support so that the two libraries are indeed compatible.