GCP Pub/Sub
Aidbox has support of GCP Pub/Sub integration
Last updated
Was this helpful?
Aidbox has support of GCP Pub/Sub integration
Last updated
Was this helpful?
This is old, not stable version.
Since version 2309 Aidbox has GCP Pub/Sub integration via Topic-Based Subscriptions, which is ready for production use.
GCP Pub/Sub integration currently is in Alpha
Any create, update, or delete operations on all resources in Aidbox may be published to a GCP Pub/Sub topic.
In order to enable GCP Pub/Sub integration you need to provide a few env variables:
Aidbox doesn't create the topic, specified in BOX_SUBSCRIPTIONS_PUBSUB_TOPIC
.
On every resource update, Aidbox will publish to GCP Pub/Sub message with empty body and few attributes:
resourceType — resource type of updated resource
id — id of the updated resource
versionId — version id of the updated resource
action — action (create, update, delete)
box-id — Aidbox id.
You can enable GCP Pub/Sub integration to work with a local Pub/Sub emulator. In that case, you need to provide these env variables:
By default message about change is published after the change is written to a Database. This approach makes the situation possible when a change was performed, but the message was not published.
Set
to publish a message before a change is saved to Database.
versionId
attribute of a message will store the id of the version before the update of nil
for create
operation.
With this option enabled, the situation is possible, where a message is published but no corresponding change was actually saved to Database.
By default, messages for all resource types from all boxes are published. To specify, what resource types and boxes should trigger a notification set
It's possible to specify different topics per box. Topic without box specification treated as default.