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 "" \
    --role "roles/pubsub.editor"
$ gcloud iam service-accounts keys create keyfile.json \
$ kalix projects config set broker \
  --broker-service google-pubsub \
  --gcp-key-file keyfile.json \
  --description "Google Pub/Sub in foobar"

Then I went to and created the 3 topics manually.

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

2023-06-03 00:00:25
Discovery Failure
Giving up connecting to user function at [] 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.


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.