Skip to content
This repository was archived by the owner on Apr 22, 2022. It is now read-only.

Reproduce issue-483 #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions divolte/schema/src/main/docker/divolte-collector.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -142,6 +149,12 @@ divolte {

localkafka {
type = kafka
topic = bar
}

localkafka_2 {
type = kafka
topic = foo
}
}
}
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 35 additions & 0 deletions issue-483.md
Original file line number Diff line number Diff line change
@@ -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)