From 68f49df1a8853ef6039c7583d6c452ba601d7117 Mon Sep 17 00:00:00 2001 From: Kris Geusebroek Date: Fri, 12 Feb 2021 16:39:09 +0100 Subject: [PATCH 1/2] Reproduce issue-483 --- .../src/main/docker/divolte-collector.conf | 13 +++++++ docker-compose.yml | 2 +- issue-483.md | 35 +++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 issue-483.md diff --git a/divolte/schema/src/main/docker/divolte-collector.conf b/divolte/schema/src/main/docker/divolte-collector.conf index a200bec..851dd8b 100644 --- a/divolte/schema/src/main/docker/divolte-collector.conf +++ b/divolte/schema/src/main/docker/divolte-collector.conf @@ -126,6 +126,13 @@ divolte { sources = [browser] sinks = [localkafka, localdata] } + + my_mapping_2 = { + schema_file = ${DIVOLTE_CONF_DIR}/ShopEventRecord.avsc + mapping_script_file = ${DIVOLTE_CONF_DIR}/mapping.groovy + sources = [browser] + sinks = [localkafka_2] + } } sinks { @@ -142,6 +149,12 @@ divolte { localkafka { type = kafka + topic = bar + } + + localkafka_2 { + type = kafka + topic = foo } } } diff --git a/docker-compose.yml b/docker-compose.yml index c7dee99..f9a65af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,7 +55,7 @@ services: ADVERTISED_HOST: kafka LOG_RETENTION_HOURS: 1 AUTO_CREATE_TOPICS: "false" - KAFKA_CREATE_TOPICS: divolte:4:1 + KAFKA_CREATE_TOPICS: divolte:4:1,bar:4:1,foo:4:1 ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,INTERNAL://localhost:9093 LISTENERS: PLAINTEXT://0.0.0.0:9092,INTERNAL://0.0.0.0:9093 SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT diff --git a/issue-483.md b/issue-483.md new file mode 100644 index 0000000..1be5c61 --- /dev/null +++ b/issue-483.md @@ -0,0 +1,35 @@ +# Try to reproduce divolte collector issue 483 + +https://github.com/divolte/divolte-collector/issues/483 + +## Start services + +```bash +./refresh +``` + +## Load data + +```bash +./load_data +``` + +## Click on 1 photo in a category + +go to localhost:9011 and chosse a category and click a single image + +this should result in 3 pageview messages in the `foo` topic and 3 in the `bar` topic + +inspect this with: + +```bash +docker exec -ti kafka /bin/bash +# /opt/kafka_2.12-2.3.0/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic foo --from-beginning + +# /opt/kafka_2.12-2.3.0/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic bar --from-beginning +``` + +The messages are all pageviews and the locations are: +- localhost:9011 +- localhost:9011/category/animals (or other category) +- localhost:9011/product/10060423096 (or other id) \ No newline at end of file From 06328a1f51d3a534b04c611059c8b32743bebc14 Mon Sep 17 00:00:00 2001 From: Andrew Snare Date: Fri, 26 Feb 2021 14:26:48 +0100 Subject: [PATCH 2/2] Update issue-483.md --- issue-483.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/issue-483.md b/issue-483.md index 1be5c61..8771c59 100644 --- a/issue-483.md +++ b/issue-483.md @@ -16,7 +16,7 @@ https://github.com/divolte/divolte-collector/issues/483 ## Click on 1 photo in a category -go to localhost:9011 and chosse a category and click a single image +go to localhost:9011 and choose a category and click a single image this should result in 3 pageview messages in the `foo` topic and 3 in the `bar` topic @@ -32,4 +32,4 @@ docker exec -ti kafka /bin/bash The messages are all pageviews and the locations are: - localhost:9011 - localhost:9011/category/animals (or other category) -- localhost:9011/product/10060423096 (or other id) \ No newline at end of file +- localhost:9011/product/10060423096 (or other id)