Open agonbina opened 7 years ago
This sounds like a great feature! I think we can do it.
Just adding support for this - it would be awesome and just what I'm looking for. Thanks.
Any news on this? I just spent quite some time wondering why my function wasn't being triggered after using functions deploy .... --trigger-topic ...
to set it up. Never crossed my mind that the two emulators would not work together!
..bump
Any updates on this issue? I'm glad I found it because I thought my code wasn't working. I suspected it might be the emulator, but couldn't find any docs that described the issue.
This would be awesome for developing a pipeline and seeing it work during integration testing.
Note: this is a feature request
Description
It would be great to have functions that are subscribed to pubsub topics trigger when a new message is published in this topic, locally, in the pubsub emulator.
On startup, the emulator could check if there is a
PUBSUB_EMULATOR_HOST
env variable set, which would signal that the pubsub emulator is running. The@google-cloud/pubsub
node sdk is aware of this env variable and is able to talk to the emulator instead of a production pubsub service.The emulator can then subscribe to the topics each background function is bound to and trigger them on every message respectively.
Do you think this is something that could be supported in the future? Thanks!