mq.receive.max.poll.time.ms, to limit the maximum time spent polling messages in a Kafka Connect task cycle #153
+220
−40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new configuration option,
mq.receive.max.poll.time.ms
, to limit the maximum time spent polling messages in a Kafka Connect task cycle. It also includes updates to the implementation and tests to support this feature.New Configuration Option:
mq.receive.max.poll.time.ms
to define the maximum time (in milliseconds) for polling messages during a Kafka Connect task cycle. If set to0
, polling continues until the batch size is met or no more messages are available. This configuration is documented in theREADME.md
and integrated into the connector's configuration definitions.Implementation Updates:
MQSourceTask
class to use the newmq.receive.max.poll.time.ms
configuration. The polling logic now respects the maximum poll time, ensuring the task terminates polling early if the time limit is reached.Testing Enhancements:
MQSourceTaskIT.java
to validate the behavior of themq.receive.max.poll.time.ms
configuration under different scenarios, such as terminating early, respecting batch size, and handling a value of0
.These changes improve the flexibility and control of the Kafka Connect source connector for IBM MQ, allowing users to fine-tune message polling behavior.# Description
Type of change
How Has This Been Tested?
Checklist