GCP PubSub
Overviewβ
Export evaluation data inside a GCP PubSub topic.info
Google Cloud PubSub is an exporter of type queue, it means that it send events as soon as he receives them it does not work in bulk but in near real time.
Configure the relay proxyβ
To configure your relay proxy to use the Google Cloud PubSub exporter, you need to add the following configuration to your relay proxy configuration file:
goff-proxy.yaml
# ...
exporter:
kind: pubsub
projectID: "my-project-id"
topic: "goff-feature-events"
# ...
Field name | Mandatory | Type | Default | Description |
---|---|---|---|---|
kind | string | none | Value should be pubsub .This field is mandatory and describes which retriever you are using. | |
projectID | string | none | Value should be ID of GCP project you are using. | |
topic | string | none | Topic name on which messages will be published. |
Configure the GO Moduleβ
To configure your GO module to use the Google Cloud PubSub exporter, you need to add the following
configuration to your ffclient.Config{}
object:
example.go
config := ffclient.Config{
// ...
DataExporter: ffclient.DataExporter{
// ...
Exporter: &pubsubexporter.Exporter{
ProjectID: "project-id", // required
Topic: "topic", // required
Options: []option.ClientOption{...},
PublishSettings: &pubsub.PublishSettings{...},
EnableMessageOrdering: true,
},
},
// ...
}
err := ffclient.Init(config)
defer ffclient.Close()
Field | Mandatory | Description |
---|---|---|
ProjectID | ID of GCP project. You can find it in your GCP console | |
Topic | Name of topic on which messages will be published | |
Options | PubSub client options (see docs) | |
PublishSettings | Topic related settings (see docs) | |
EnableMessageOrdering | Enables delivery of ordered keys |