Skip to content
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

Go back to polling for the kafka onramp #779

Merged
merged 7 commits into from
Feb 24, 2021
Merged

Go back to polling for the kafka onramp #779

merged 7 commits into from
Feb 24, 2021

Conversation

mfelsche
Copy link
Member

@mfelsche mfelsche commented Feb 23, 2021

Pull request

Description

  • Do not use the async StreamConsumer and MessageStream for the kafka onramp anymore. It is hanging if there is no message in the kafka queue, hindering the runtime from consuming control-plane and CB events. This PR uses the BaseConsumer and on each pull_event it is polling kafka for a new message.
  • Make the poll_interval configurable for the kafka onramp. People might want to set it to lower values if they want to be informed faster of incoming messages when their queue has been empty before.
  • Add the retry_failed_events setting (default true), that if set to false, will not seek back to the offset of the failed event it received, but keep on going. This means those failed events remain uncommitted and will only ever be retried if tremor restarts.
  • Add the cb offramp that sends back CB events as requested in the event metadata or payload. E.g. {"cb": "ack"} Mostly for testing onramp/operator behaviour with CB events.
  • Make the kafka onramp fail upon initialization if it couldnt connect to the cluster or couldnt subscribe to all configured topics.

Related

Checklist

  • The RFC, if required, has been submitted and approved
  • Any user-facing impact of the changes is reflected in docs.tremor.rs
  • The code is tested
  • Use of unsafe code is reasoned about in a comment
  • Update CHANGELOG.md appropriately, recording any changes, bug fixes or other observable changes in behavior

Matthias Wahl added 4 commits February 24, 2021 00:03
Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
We poll on our own now in order to avoid hanging and not progressing on insights or control-plane events.

Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
@mfelsche mfelsche added bug Something isn't working enhancement New feature or request offramp Offramps onramp Onramps labels Feb 23, 2021
Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
@coveralls
Copy link
Collaborator

coveralls commented Feb 23, 2021

Coverage Status

Coverage increased (+0.04%) to 81.541% when pulling d96a9b2 on kafka-polling into 05d0d5f on main.

Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
CHANGELOG.md Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
Copy link
Member

@Licenser Licenser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love how this simplifies the kafka source! ❤️ 👍

@Licenser Licenser merged commit 4848733 into main Feb 24, 2021
@Licenser Licenser deleted the kafka-polling branch February 24, 2021 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request offramp Offramps onramp Onramps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants