Skip to content

Commit

Permalink
Polished. Fixes #910.
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Mar 21, 2016
1 parent af9fe4c commit 5207d82
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public class KafkaConfiguration {
//fetch.max.wait.ms
@UriParam(label = "consumer", defaultValue = "500")
private Integer fetchWaitMaxMs = 500;
@UriParam(label = "consumer")
private boolean seekToBeginning;

//Consumer configuration properties
@UriParam(label = "consumer")
Expand Down Expand Up @@ -1197,4 +1199,16 @@ public void setValueDeserializer(String valueDeserializer) {
this.valueDeserializer = valueDeserializer;
}

public boolean isSeekToBeginning() {
return seekToBeginning;
}

/**
* If the option is true, then KafkaConsumer will read from beginning on startup.
*/
public void setSeekToBeginning(boolean seekToBeginning) {
this.seekToBeginning = seekToBeginning;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ public class KafkaEndpoint extends DefaultEndpoint implements MultipleConsumersS
private KafkaConfiguration configuration = new KafkaConfiguration();
@UriParam
private boolean bridgeEndpoint;
@UriParam
private boolean seekToBeginning;

public KafkaEndpoint() {
}
Expand Down Expand Up @@ -665,6 +663,14 @@ public String getSslProtocol() {
return configuration.getSslProtocol();
}

public boolean isSeekToBeginning() {
return configuration.isSeekToBeginning();
}

public void setSeekToBeginning(boolean seekToBeginning) {
configuration.setSeekToBeginning(seekToBeginning);
}

public boolean isBridgeEndpoint() {
return bridgeEndpoint;
}
Expand All @@ -676,14 +682,4 @@ public void setBridgeEndpoint(boolean bridgeEndpoint) {
this.bridgeEndpoint = bridgeEndpoint;
}

public boolean isSeekToBeginning() {
return seekToBeginning;
}

/**
* If the option is true, then KafkaConsumer will read from beginning on startup.
*/
public void setSeekToBeginning(boolean seekToBeginning) {
this.seekToBeginning = seekToBeginning;
}
}

0 comments on commit 5207d82

Please sign in to comment.