I have written a sample pubsub consume to cosumer messages from topic via subscription
It is expecting GetTopic Permission on topic not on subscription
spring.cloud.stream.gcp.pubsub.default.consumer.auto-create-resources=false
spring.cloud.stream.gcp.pubsub.default.producer.auto-create-resources=false
spring.cloud.function.definition=myCosnumer
spring.cloud.stream.gcp.pubsub.bindings.myCosnumer-in-0.consumer.subscriptionName=projects/projectId/subscriptions/my-topic-sub
spring.cloud.stream.bindings.myCosnumer-in-0.destination=projects/projectId/topics/my-topic
spring.cloud.stream.bindings.myCosnumer-in-0.binder=pubsub
spring.cloud.stream.bindings.myCosnumer-in-0.content-type=application/json