PubSub topic error on Kalix deploy

Hi, I’m trying to deploy a Kalix service that uses 3 topics. A few questions:

  • Is Kalix supposed to create those topics automatically? It’s not clear from the documentation if that’s the case.
  • I’ve assumed I need to create the topics manually. So I followed the instructions:
$ gcloud iam service-accounts create kalix-pubsub-broker
$ gcloud projects add-iam-policy-binding foobar \
    --member "serviceAccount:kalix-pubsub-broker@foobar.iam.gserviceaccount.com" \
    --role "roles/pubsub.editor"
$ gcloud iam service-accounts keys create keyfile.json \
    --iam-account kalix-pubsub-broker@foobar.iam.gserviceaccount.com
$ kalix projects config set broker \
  --broker-service google-pubsub \
  --gcp-key-file keyfile.json \
  --description "Google Pub/Sub in foobar"

Then I went to console.cloud.google.com and created the 3 topics manually.

When looking into the Kalix Console logs the deployment seems stuck.

2023-06-03 00:00:25
foobar-6df58fcd57-6v6xg
Pod
Discovery Failure
Giving up connecting to user function at [127.0.0.1:8080] after 61
exec /opt/docker/bin/services: exec format error
Error reported from Kalix system: KLX-00410 The topic [projects/foobar/topics/foo-topic] was not found in GCP project [foobar]

Please create the Google Cloud Pub/Sub topic and make ensure your Service Account has the appropriate permissions: add 'roles/pubsub.editor' for convenience, or otherwise at least 'roles/pubsub.viewer'.

If it’s of any help, the Kalix project id is 1f3890f9-9b45-4376-8070-8a39d29490c0.

Thanks

It eventually worked. So it seems the PubSub topics need to be created manually. It’s the subscriptions that are created automatically by Kalix, with the correct “Message ordering” setting.

Hi @glop.postbox.0u

yes, message ordering is enabled by default.