-
Notifications
You must be signed in to change notification settings - Fork 693
spring.cloud.stream.bindings.input.consumer.maxattempts and backOffInitialInterval does not work with pubsub #2560
Comments
I'm looking into org.springframework.cloud.gcp.stream.binder.pubsub,PubSubMessageChannelBinder source code and it looks like it doesn't use any properties under consumer at all. Can anybody help me with this?
|
@thayhoang You are correct; we do not support the additional retry options in the Pub/Sub binder. Similarly to #2406, are you looking for:
|
Thank you, @elefeint Is the concurrency property is respected by pubsub? Because I dont see it referenced in the Pubsub binder class |
It is not, but you may find two related Pub/Sub-native properties useful: |
@thayhoang I've just verified that |
@elefeint So these 2 settings will be applied for all subscriptions right? What if I want to have a different parallel setting for each subscription. For example I have two subscription, one for main topic, the other for dead letter topic. How can I have different parallel setting for each one?
|
That's correct; we don't support customizing Pub/Sub settings per-stream. What kind of issues are you seeing with global parallelization settings? |
@elefeint It's just my old project used rabbitmq and we can set different concurrency on each stream and I'd like to keep it the same with pubsub. It's not a big deal though. About parallel-pull-count and executor-threads, What's the difference between them? Suppose I need to have concurrency of 6, should I set it parallel-pull-count = 2 and executor-threads = 3 or vice versa? Or 1 parallel-pull-count and 6 executor-threads? What's the combination of these that you recommend? |
Each unit in There was a good answer on StackOverlow from @anguillanneuf describing the two properties. |
I used this setting with spring-cloud-starter-stream-rabbit and as I understand behind the scene, Spring create a RetryTemplate and retry the method until maxattempts. This doesn't work with spring-cloud-gcp-pubsub-stream-binder anymore. Here's my configuration
Does spring-cloud-gcp-pubsub-stream-binder support maxattempts and backOffInitialInterval?
The text was updated successfully, but these errors were encountered: