Skip to content
This repository was archived by the owner on Sep 18, 2019. It is now read-only.

Commit 275fda2

Browse files
author
Joe Wass
committed
Evidence Log to acknowledge one (not all) Kafka replica(s).
This is more robust in the case of partial cluster Kafka failure. Also demote 'error' to 'info' for URL tracking params stripping.
1 parent a8afa58 commit 275fda2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject event-data-common "0.1.59"
1+
(defproject event-data-common "0.1.60"
22
:description "Crossref Event Data Common"
33
:url "http://eventdata.crossref.org"
44
:license {:name "The MIT License (MIT)"

src/event_data_common/evidence_log.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
(delay
1616
(KafkaProducer. {
1717
"bootstrap.servers" (:global-kafka-bootstrap-servers env)
18-
"acks" "all"
18+
; Make sure it's flushed on the broker, but don't wait for all replicas.
19+
; This is more robust if one replica stops working.
20+
"acks" "1"
1921
"retries" (int 5)
2022
"key.serializer" "org.apache.kafka.common.serialization.StringSerializer"
2123
"value.serializer" "org.apache.kafka.common.serialization.StringSerializer"})))

src/event_data_common/url_cleanup.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
(.build))]
5050
(str new-uri))
5151

52+
; This can happen because the URL isn't a vailid URI, e.g. illegal chars in fragment.
53+
; No big deal, this is best-effort.
5254
(catch Exception ex
5355
(do
54-
(log/error "Failed to remove tracking params" url)
56+
(log/info "Failed to remove tracking params" url)
5557
url))))

0 commit comments

Comments
 (0)