-
Notifications
You must be signed in to change notification settings - Fork 9
Allow users to override Flink PubSub subscriber settings #882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe PubSubFlinkSource now supports user-configurable message pulling parameters via properties, replacing previously hardcoded values for messages per pull, pull timeout, and max retries. New property keys and default values are introduced, and the builder is updated to use these configurable options. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PubSubFlinkSource
participant Builder
User->>PubSubFlinkSource: Provide properties map
PubSubFlinkSource->>PubSubFlinkSource: Read messages_per_pull, max_retries, pull_timeout_ms (with defaults)
PubSubFlinkSource->>Builder: Pass parameters to builder
Builder-->>PubSubFlinkSource: Build source with user or default configs
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (14)
🔇 Additional comments (5)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary
While letting the PubSub canary job run for a prolonged period of time with the timeout updates in #877 I noticed that they were set too low. PubSub seems to refresh connections / credentials every hour or so which results in a bit of a latency spike while pulling messages. At 1s we hit this timeout and as the underlying PubSub source throws rather than swallows the error we see the Flink job restart (which results in a couple of mins of ensuing lag). I have bumped this timeout further to 5s and let the job run for a few hours and we don't see the restarts kicking in. We still see the periodic spikes (digging into that async) that result in lag going up to 2-2.5s every hour ish but that's a lot better than the full job restart.
I made this and some of the other settings configurable (similar to what we have for Kafka sources) so bumping timeouts / retries etc won't require a core chronon engine change and deploy going forward.

Checklist
Summary by CodeRabbit
New Features
Chores