Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ private ClientConfig.Builder createClientConfig(
.withTopicConfig(topicConfig)
.withConsumerId(consumerId)
.withPartitions(view.getPartitionsAsSet())
.withMaxResultsPerPartition(view.getResultsPerPartition());
.withMaxResultsPerPartition(view.getResultsPerPartition())
.withPollTimeoutMs(view.getPollTimeoutMs());

final List<RecordFilterDefinition> recordFilterDefinitions = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public class View {
@Column(nullable = false)
private Integer resultsPerPartition = 10;

@Column(nullable = false)
private long pollTimeoutMs = 5000;

@OneToMany(
fetch = FetchType.LAZY,
cascade = { CascadeType.PERSIST, CascadeType.MERGE },
Expand Down Expand Up @@ -159,6 +162,14 @@ public void setResultsPerPartition(final Integer resultsPerPartition) {
this.resultsPerPartition = resultsPerPartition;
}

public long getPollTimeoutMs() {
return pollTimeoutMs;
}

public void setPollTimeoutMs(long pollTimeoutMs) {
this.pollTimeoutMs = pollTimeoutMs;
}

/**
* @return Returns the defined partitions as a Set.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `view` ADD COLUMN IF NOT EXISTS poll_timeout_ms INT NOT NULL DEFAULT 5000 AFTER partitions;