Skip to content

Executing only one pubsub callback concurrently #4687

Closed
@philipp-eisen

Description

@philipp-eisen

I have a problem, where I depend on stateful externals resources, that require me to only process one message at a time.

I was trying to accomplish that by setting the max_messages in the FlowControl to 1. However, the callbacks were still executed concurrently.

So I dug a bit deeper and found this commit. I thought I could pass an event and use that to block the thread until the execution of the callback is done.

However, it was not entirely clear to me how this is meant to be use. The only place I found, where an event can be passed is the constructor of the future. However, the docstring discourages to use this class.

So, is the intended way to use this, to implement a new policy? Because this is the place, where I would have assumed the event to be passed through.

If I'm completely off track and if there's some completely different way of going about this, please let me know.

I appreciate you work!

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions