vmware-archive / kubeless

Kubernetes Native Serverless Framework
https://kubeless.io
Apache License 2.0
6.86k stars 754 forks source link

Kubeless blocking the publish api of Google Pubsub topic #1234

Open aswathy1294 opened 3 years ago

aswathy1294 commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?: FEATURE REQUEST What happened: Messages not getting published in Google pubsub topic when deployed the function with Kubeless. What you expected to happen: I would like to use kubeless to deploy a python function which will publish the data to pubsub topic without any call back function as it will add the latency to my use case.

Sri-krishna98 commented 3 years ago

I've been facing the same issue, the publisher.publish operation of gcp pubsub python SDK is inherently async and returns a future and unless I block the other operations by doing future.result() it doesn't work and adds very high latency to the operation itself What should work

Future=publisher.publish(topic, message) This future is never completed

What works

Future=publisher.publish(topic, message) Future.result() <- this makes it blocking

Please look into this BUG!