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..8771c59 --- /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 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 + +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)