Skip to content

Commit 6dba593

Browse files
Merge pull request #325 from hubert-s/feature_324
Fixes #324 by disabling health-check when splunk.hec.lb.poll.interval…
2 parents f561c03 + 6f7cbb6 commit 6dba593

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Use the below schema to configure Splunk Connect for Kafka
163163
| `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` |
164164
| `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` |
165165
| `splunk.hec.backoff.threshhold.seconds` | The amount of time Splunk Connect for Kafka waits to attempt resending after errors from a HEC endpoint." | `60` |
166-
| `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` |
166+
| `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` |
167167
| `splunk.hec.enable.compression` | Valid settings are true or false. Used for enable or disable gzip-compression. |`false`|
168168
### Acknowledgement Parameters
169169
#### Use Ack

src/main/java/com/splunk/hecclient/LoadBalancer.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,15 @@ public LoadBalancer(HecConfig hecConfig, CloseableHttpClient client) {
6363
Runnable r = () -> {
6464
run();
6565
};
66-
scheduledExecutorService.scheduleWithFixedDelay(r, 0, this.hecConfig.getlbPollInterval(), TimeUnit.MILLISECONDS);
66+
67+
if (this.hecConfig.getlbPollInterval() > 0)
68+
{
69+
scheduledExecutorService.scheduleWithFixedDelay(r, 0, this.hecConfig.getlbPollInterval(), TimeUnit.MILLISECONDS);
70+
}
71+
else
72+
{
73+
log.info("Disabling out-of-band health-check");
74+
}
6775
}
6876

6977
public void setHttpClient(CloseableHttpClient httpClient) {

0 commit comments

Comments
 (0)