Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-sb-devops
Commits
f5e546dc
Unverified
Commit
f5e546dc
authored
4 years ago
by
Pradyumna
Committed by
GitHub
4 years ago
Browse files
Options
Download
Patches
Plain Diff
Relaxed kafka appender for search-service logback (#1466)
parent
172b3ee1
loadtest-release-2.10.0_nginx_prometheus
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansible/roles/stack-sunbird/templates/search-service_logback.xml
+15
-17
.../roles/stack-sunbird/templates/search-service_logback.xml
with
15 additions
and
17 deletions
+15
-17
ansible/roles/stack-sunbird/templates/search-service_logback.xml
+
15
−
17
View file @
f5e546dc
...
...
@@ -32,26 +32,24 @@
<topic>
{{env_name}}.telemetry.raw
</topic>
<!-- ensure that every message sent by the executing host is partitioned to the same partition strategy -->
<keyingStrategy
class=
"com.github.danielwegener.logback.kafka.keying.
HostName
KeyingStrategy"
/>
<keyingStrategy
class=
"com.github.danielwegener.logback.kafka.keying.
NoKey
KeyingStrategy"
/>
<!-- block the logging application thread if the kafka appender cannot keep up with sending the log messages -->
<deliveryStrategy
class=
"com.github.danielwegener.logback.kafka.delivery.BlockingDeliveryStrategy"
>
<!-- wait indefinitely until the kafka producer was able to send the message -->
<timeout>
0
</timeout>
</deliveryStrategy>
<deliveryStrategy
class=
"com.github.danielwegener.logback.kafka.delivery.AsynchronousDeliveryStrategy"
/>
<!-- each <producerConfig> translates to regular kafka-client config (format: key=value) -->
<!-- producer configs are documented here: https://kafka.apache.org/documentation.html#newproducerconfigs -->
<!-- bootstrap.servers is the only mandatory producerConfig -->
<producerConfig>
bootstrap.servers={{lp_kafka_url}}
</producerConfig>
<!-- restrict the size of the buffered batches to 8MB (default is 32MB) -->
<producerConfig>
buffer.memory=8388608
</producerConfig>
<!-- If the kafka broker is not online when we try to log, just block until it becomes available -->
<producerConfig>
metadata.fetch.timeout.ms=99999999999
</producerConfig>
<!-- producer configs are documented here: https://kafka.apache.org/documentation.html#newproducerconfigs -->
<!-- bootstrap.servers is the only mandatory producerConfig -->
<producerConfig>
bootstrap.servers={{lp_kafka_url}}
</producerConfig>
<!-- don't wait for a broker to ack the reception of a batch. -->
<producerConfig>
acks=0
</producerConfig>
<!-- wait up to 1000ms and collect log messages before sending them as a batch -->
<producerConfig>
linger.ms=15000
</producerConfig>
<!-- even if the producer buffer runs full, do not block the application but start to drop messages -->
<producerConfig>
max.block.ms=0
</producerConfig>
<!-- define a client-id that you use to identify yourself against the kafka broker -->
<producerConfig>
client.id=${HOSTNAME}-${CONTEXT_NAME}-logback-re
strictive
</producerConfig>
<!-- Log every log message that could not be sent to kafka to STDERR -->
<
appender-ref
ref=
"ASYNCSTDOUT"
/
>
<producerConfig>
client.id=${HOSTNAME}-${CONTEXT_NAME}-logback-re
laxed
</producerConfig>
<
!-- there is no fallback <appender-ref>. If this appender cannot deliver, it will drop its messages. --
>
</appender>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets