googleapis / python-pubsub

Apache License 2.0
392 stars 205 forks source link

Publisher Limit Exceeded Behavior defaults to IGNORE while Java library defaults to BLOCK #1055

Closed oryband closed 8 months ago

oryband commented 11 months ago

The default publisher limit exceeded behavior is inconsistent between Python and Java libraries. Python "silently" skips messages while Java blocks. I'm migrating an application from Java to Python, and I was surprised the behavior to be different. How come? Both libraries use thread pools without async-io (or it's java equivalent). At the very least this inconsistency should be documented and emphasized.

mukund-ananthu commented 9 months ago

Hi @oryband , looking at the lines you refer to in the post, I see that currently:

  1. Python: limit_exceeded_behavior: LimitExceededBehavior = LimitExceededBehavior.IGNORE

  2. Java:

    .setFlowControlSettings(
                FlowControlSettings.newBuilder()
                    .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Ignore)
                    .build())

Where both languages have the behavior as ignore. Could you please let me know where you observe this deviation?

mukund-ananthu commented 8 months ago

@oryband , Closing this issue as not reproducible due to the reasons mentioned in https://github.com/googleapis/python-pubsub/issues/1055#issuecomment-1979857702. Please feel free to re-open the issue if required.