Skip to content

KAFKA-2603: Add timeout arg to ConsoleConsumer #274

Closed
rajinisivaram wants to merge 3 commits into
apache:trunkfrom
rajinisivaram:KAFKA-2603
Closed

KAFKA-2603: Add timeout arg to ConsoleConsumer #274
rajinisivaram wants to merge 3 commits into
apache:trunkfrom
rajinisivaram:KAFKA-2603

Conversation

@rajinisivaram

Copy link
Copy Markdown
Contributor

Added --timeout-ms argument to ConsoleConsumer that works with both old and new consumer. Also modified ducktape ConsoleConsumer service to use this arg instead of consumer.timeout.ms config that works only with the old consumer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It should be ok to throw an Exception if a negative timeout is specified

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@auradkar The timeout parameter is consistent with "consumer.timeout.ms" config option in the old consumer. With the old consumer, timeout less than zero indicates that there is no timeout. The same behaviour is used here for consistency.

@guozhangwang

Copy link
Copy Markdown
Contributor

Just realize now console_consumer.properties would become a dummy file again :)

My take is that the value of having a template file is to specify some universal config values that will be used across all test runs with probably different combinations of other config values; or universally use some pre-defined values from the framework setup. For example

tests/kafkatest/services/templates/console_consumer.properties

If we do not have any value definitions in the template file (i.e. a file is empty / dummy), then appending different values to this file and use it for various test runs is no difference with creating a new file each run with different values on-the-fly. Hence I feel the empty file itself brings us no extra benefit for customizing test runs, and better be removed and creating new files for different runs instead. For now since we do not have customizable test runs using console consumer yet we can simply do the same as #271.

@rajinisivaram

Copy link
Copy Markdown
Contributor Author

@guozhangwang Have removed the empty console_consumer.properties file in the latest commit.

@rajinisivaram

Copy link
Copy Markdown
Contributor Author

console_consumer.properties is now used by quota tests and is no longer empty. So I have reverted the change to remove the file and rebased.

@asfgit asfgit closed this in f13d115 Oct 14, 2015
@guozhangwang

Copy link
Copy Markdown
Contributor

LGTM, thanks @rajinisivaram for being so patient in the review process.

@rajinisivaram

Copy link
Copy Markdown
Contributor Author

@guozhangwang Thank you for reviewing and committing this.

jsancio pushed a commit to jsancio/kafka that referenced this pull request Aug 6, 2019
efeg pushed a commit to efeg/kafka that referenced this pull request Jan 29, 2020
davide-armand pushed a commit to aiven/kafka that referenced this pull request Dec 1, 2025
jeqo pushed a commit to aiven/kafka that referenced this pull request Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants