OpenBankProject / OpenBankProject/OBP-API

Kafka / Zookeeper config documentation issue

Offen
#418 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@moule3053 arbeitet bereits daran.

Seit 24.2.2017.

Vorherrschende Sprache
Scala
Sterne
1.7k
Forks
482
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
15

Beschreibung

If you try this URL

https://github.com/OpenBankProject/OBP-API/blob/7a3efef86bce34bb90a684be83ff9bd3aaae7da9/src/main/scala/code/bankconnectors/KafkaMappedConnector.scala

On line 1590 it has the code to create a Kafka producer to put messages in the Kafka queue

On line 1592 there is a statement that reads

brokerList: String = Props.get("kafka.host")openOr("localhost:9092"),

The problem with this statement is that the config file does not contain kafka.host. Because of this, localhost9092 is always used for the producer. Because of the cluster our Kafka was not on localhost and this was an issue. We could not understand why this was not working. Eventually we searched the entire OBP API code for localhost, found this line realized that we need to add kafka.host in the config file and got it working.

So part 1 of the solution is to add kafka.host on the config file with comment about this.

However if you go to line 1519 of the same file it has the code for the Kafka consumer. The code there is different in that on this line it says

val zookeeper: String = Props.get("kafka.zookeeper_host").openOrThrowException("no kafka.zookeeper_host set"),

The property kafka.zookeper_host is already in the config file.

Now the second part of the solution is to make BOTH the producer and consumer to work via the zookeeper.

It appears now that the consumer works using zookeeper, while the producer is works using Kafka directly.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.