From 4128aa2c9368ed20fab92e8c0df83f14d6233b86 Mon Sep 17 00:00:00 2001 From: Piotr Jaszczyk Date: Tue, 18 Dec 2018 15:58:56 +0100 Subject: There should be one KafkaSender per configuration We should keep only one instance of KafkaSender per instance. However, as the configuration might be changed (Consul update) it cannot be a strict singleton. Hence there should be 1to1 relationship beetween ConsulConfiguration and KafkaSender. Change-Id: Ie168028c4427741254b8c2fe316b82cca72d7668 Issue-ID: DCAEGEN2-1047 Signed-off-by: Piotr Jaszczyk --- development/bin/consul.sh | 1 - development/docker-compose.yml | 6 +++--- development/start-simulation.sh | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'development') diff --git a/development/bin/consul.sh b/development/bin/consul.sh index c229f83e..39f0bdef 100755 --- a/development/bin/consul.sh +++ b/development/bin/consul.sh @@ -61,7 +61,6 @@ TOPIC=${2:-HV_VES_PERF3GPP} CONFIGURATION=" { - \"dmaap.kafkaBootstrapServers\": \"message-router-kafka:9092\", \"collector.routing\": [{ \"fromDomain\": \"${DOMAIN}\", diff --git a/development/docker-compose.yml b/development/docker-compose.yml index a64c62da..adf8947d 100644 --- a/development/docker-compose.yml +++ b/development/docker-compose.yml @@ -44,7 +44,6 @@ services: - consul-server restart: on-failure command: ["kv", "put", "-http-addr=http://consul-server:8500", "veshv-config", '{ - "dmaap.kafkaBootstrapServers": "message-router-kafka:9092", "collector.routing": [ { "fromDomain": "perf3gpp", @@ -63,13 +62,14 @@ services: ports: - "6060:6060" - "6061:6061/tcp" - entrypoint: ["java", "-Dio.netty.leakDetection.level=paranoid", - "-cp", "*:", "org.onap.dcae.collectors.veshv.main.MainKt"] command: ["--listen-port", "6061", "--health-check-api-port", "6060", "--config-url", "http://consul-server:8500/v1/kv/veshv-config?raw=true", + "--kafka-bootstrap-servers", "message-router-kafka:9092", "--key-store-password", "onaponap", "--trust-store-password", "onaponap"] + environment: + JAVA_OPTS: "-Dio.netty.leakDetection.level=paranoid" healthcheck: test: curl -f http://localhost:6060/health/ready || exit 1 interval: 10s diff --git a/development/start-simulation.sh b/development/start-simulation.sh index 70e4aaeb..6f38ea7b 100755 --- a/development/start-simulation.sh +++ b/development/start-simulation.sh @@ -25,7 +25,7 @@ curl --header 'Content-Type: application/json' --request POST \ "vesEventListenerVersion": "7.2" }, "messageType": "VALID", - "messagesAmount": 1 + "messagesAmount": 1000000 } ]' \ http://localhost:6062/simulator/async -- cgit 1.2.3-korg