Skip to content

CAMEL-20227: avoid calling the consumer test unless Kafka consumer has been paused#14769

Merged
orpiske merged 1 commit intoapache:mainfrom
orpiske:ci-camel-4-camel-20227
Jul 10, 2024
Merged

CAMEL-20227: avoid calling the consumer test unless Kafka consumer has been paused#14769
orpiske merged 1 commit intoapache:mainfrom
orpiske:ci-camel-4-camel-20227

Conversation

@orpiske
Copy link
Contributor

@orpiske orpiske commented Jul 10, 2024

Hey @davsclaus, this is more or less what I was thinking about in my comment on #14745 (comment).

I'm wondering if we should add a log on to inform that we are not calling the afterConsumeEval.test(null) because it has not been paused (I have not done so yet, as I think it would flood the log with those messages, because it would be called after every poll).

@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟

🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run

  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot.

  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.

  • Build and test logs are available in the Summary page. Only Apache Camel committers have access to the summary.

  • ⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@orpiske
Copy link
Contributor Author

orpiske commented Jul 10, 2024

BTW, this is just a remedy. Longer term I think I should consider augmenting the RoutePolicy API - as you suggested - and checking if this could be moved there in some way.

@orpiske orpiske marked this pull request as draft July 10, 2024 05:59
@davsclaus
Copy link
Contributor

Hey @davsclaus, this is more or less what I was thinking about in my comment on #14745 (comment).

I'm wondering if we should add a log on to inform that we are not calling the afterConsumeEval.test(null) because it has not been paused (I have not done so yet, as I think it would flood the log with those messages, because it would be called after every poll).

Yeah that is not desireable. If any logging then it can be TRACE level.
Also you can add in javadoc of the API that eval is not called if paused etc.

@davsclaus
Copy link
Contributor

BTW, this is just a remedy. Longer term I think I should consider augmenting the RoutePolicy API - as you suggested - and checking if this could be moved there in some way.

We can add a note in the kafka doc to point users to route policy as well.
And maybe add an OOTB policy that can use a predicate or something as logic to suspend/resume, so users can use that.
And with the new label=bean configurer we can make it configurable and tooling friendly, and for low-code users as well.

@orpiske
Copy link
Contributor Author

orpiske commented Jul 10, 2024

Thanks. I'll include these documentation improvements into this PR.

@orpiske orpiske force-pushed the ci-camel-4-camel-20227 branch from 1bae6e7 to 067c748 Compare July 10, 2024 06:39
@github-actions github-actions bot added the core label Jul 10, 2024
@orpiske
Copy link
Contributor Author

orpiske commented Jul 10, 2024

Created https://issues.apache.org/jira/browse/CAMEL-20957 for re-implementing this as a RoutePolicy.

@orpiske orpiske force-pushed the ci-camel-4-camel-20227 branch from 067c748 to 126d284 Compare July 10, 2024 10:02
@orpiske orpiske marked this pull request as ready for review July 10, 2024 14:26
@orpiske
Copy link
Contributor Author

orpiske commented Jul 10, 2024

Looking good on the CI. Let's merge.

@orpiske orpiske merged commit 869e870 into apache:main Jul 10, 2024
@orpiske orpiske deleted the ci-camel-4-camel-20227 branch October 1, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants