Closed SheheryarAamir closed 1 year ago
I don't think it's possible with Spring Cloud Stream, having nothing to do with Pub/Sub. Can you just bind to two different methods where they in turn call a single method?
@meltsufin how to adding multiple subscription, because above provided yaml doesnt allow
for example I cant do this
spring:
cloud:
stream:
gcp:
pubsub:
default:
consumer01:
subscriptionName: subscription_A
consumer02:
subscriptionName: subscription_A
bindings:
functionToReceiveMessageFromSubscriptionA-in-0
destination: topic_A
functionToReceiveMessageFromSubscriptionA-in-0
destination: topic_B
@SheheryarAamir You shouldn't use default
in this case. Try: spring.cloud.stream.gcp.pubsub.bindings.functionToReceiveMessageFromSubscriptionA-in-0.consumer.subscriptionName
.
See: https://googlecloudplatform.github.io/spring-cloud-gcp/reference/html/index.html#consumer-destination-configuration.
Thank you @meltsufin
Describe the bug Let say I was three PROJECTS project_A, project_B and project_C. Project A and B have a topic topic_A and topic_B. In project_C I have two subscriptions subscription_A (subscribe to topic_A) and subscription_B (subscribe to topic_B).
I want to bind both subscription to same function
functionToReceiveMessageFromSubscriptionAandB
So far, I am unable to find how to set this up with google pubsub stream binder. Could someone guide if this can be done ?
Sample
Spring Cloud GCP PubSub Stream binder version: 4.8.2