mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 11:06:49 +00:00
issue #139 - new KafkaLibMapeedConnector
This commit is contained in:
parent
500a53e6c0
commit
81ecee84e7
5
pom.xml
5
pom.xml
@ -209,6 +209,11 @@
|
||||
<artifactId>signpost-commonshttp4</artifactId>
|
||||
<version>1.2.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tesobe.obp</groupId>
|
||||
<artifactId>obp-ri-kafka</artifactId>
|
||||
<version>2016.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
connector=mapped
|
||||
#connector=mongodb
|
||||
#connector=kafka
|
||||
#connector=kafka_lib_v0
|
||||
#connector=...
|
||||
|
||||
#if using kafka connector, set zookeeper host
|
||||
|
||||
@ -37,12 +37,19 @@ object Connector extends SimpleInjector {
|
||||
|
||||
val connector = new Inject(buildOne _) {}
|
||||
|
||||
def buildOne: Connector =
|
||||
Props.get("connector").openOrThrowException("no connector set") match {
|
||||
case "mapped" => LocalMappedConnector
|
||||
case "mongodb" => LocalConnector
|
||||
case "kafka" => KafkaMappedConnector
|
||||
def buildOne: Connector = {
|
||||
val connectorProps = Props.get("connector").openOrThrowException("no connector set")
|
||||
|
||||
if (connectorProps.startsWith("kafka_lib")) {
|
||||
KafkaLibMappedConnector
|
||||
} else {
|
||||
connectorProps match {
|
||||
case "mapped" => LocalMappedConnector
|
||||
case "mongodb" => LocalConnector
|
||||
case "kafka" => KafkaMappedConnector
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
1049
src/main/scala/code/bankconnectors/KafkaLibMappedConnector.scala
Normal file
1049
src/main/scala/code/bankconnectors/KafkaLibMappedConnector.scala
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user