OpenBankProject / OpenBankProject/OBP-API

Kafka / Zookeeper config documentation issue

Open
#418 0 comments 0 reactions 1 assignee View on GitHub

@moule3053 is already working on this.

Since Feb 24, 2017.

Dominant language
Scala
Stars
1.7k
Forks
482
Avg merge
1d 12h
Merged PRs (30d)
15

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.