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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Use the below schema to configure Splunk Connect for Kafka
| `splunk.hec.max.outstanding.events` | Maximum amount of un-acknowledged events kept in memory by connector. Will trigger back-pressure event to slow down collection if reached. | `1000000` |
| `splunk.hec.max.retries` | Amount of times a failed batch will attempt to resend before dropping events completely. Warning: This will result in data loss, default is `-1` which will retry indefinitely | `-1` |
| `splunk.hec.backoff.threshhold.seconds` | The amount of time Splunk Connect for Kafka waits to attempt resending after errors from a HEC endpoint." | `60` |
| `splunk.hec.lb.poll.interval` | Specify this parameter(in seconds) to control the polling interval(increase to do less polling, decrease to do more frequent polling) | `120` |
| `splunk.hec.lb.poll.interval` | Specify this parameter(in seconds) to control the polling interval(increase to do less polling, decrease to do more frequent polling, set `-1` to disable polling) | `120` |
| `splunk.hec.enable.compression` | Valid settings are true or false. Used for enable or disable gzip-compression. |`false`|
### Acknowledgement Parameters
#### Use Ack
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/splunk/hecclient/LoadBalancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ public LoadBalancer(HecConfig hecConfig, CloseableHttpClient client) {
Runnable r = () -> {
run();
};
scheduledExecutorService.scheduleWithFixedDelay(r, 0, this.hecConfig.getlbPollInterval(), TimeUnit.MILLISECONDS);

if (this.hecConfig.getlbPollInterval() > 0)
{
scheduledExecutorService.scheduleWithFixedDelay(r, 0, this.hecConfig.getlbPollInterval(), TimeUnit.MILLISECONDS);
}
else
{
log.info("Disabling out-of-band health-check");
}
}

public void setHttpClient(CloseableHttpClient httpClient) {
Expand Down