OpenBankProject / OpenBankProject/OBP-API

Kafka / Zookeeper config documentation issue

Aperta
#418 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@moule3053 ci sta già lavorando.

Dal 24/2/2017.

Lingua principale
Scala
Stelle
1.7k
Fork
482
Merge medio
1g 12h
PR unite (30g)
15

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.