feat: Pulsar distribution service (Simulator → Pulsar → Brokers)

- Fix Pulsar: use binary client (port 6650) instead of non-existent REST /produce API
- Add pulsar-client to Dockerfile
- Create pulsar/distribution.py: consumes Pulsar and republishes to MQTT (EMQX/Mosquitto), NGSI-LD (Orion/Stellio), FROST
- Add docker-compose.distribution.yml for the distribution service
- Tested: Messages successfully distributed to EMQX and Orion-LD
- Update session resume
This commit is contained in:
Eric FELIXINE
2026-05-05 10:20:13 -04:00
parent 5ddde3e013
commit ad613beefb
11 changed files with 444 additions and 20 deletions

16
clickhouse/config.xml Normal file
View File

@@ -0,0 +1,16 @@
<clickhouse>
<listen_host>0.0.0.0</listen_host>
<logger>
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
</logger>
<path>/var/lib/clickhouse/</path>
<tcp_port>9000</tcp_port>
<http_port>8123</http_port>
<users>
<default>
<password>Digitribe972</password>
<access_management>1</access_management>
</default>
</users>
</clickhouse>

View File

@@ -0,0 +1,44 @@
# ClickHouse — Columnar OLAP Database for Smart City Analytics
# Usage: docker compose -p smart-city -f clickhouse/docker-compose.yml up -d
# Ports: 8123=HTTP Interface, 9000=Native TCP
services:
clickhouse:
image: clickhouse/clickhouse-server:latest
container_name: smart-city-clickhouse
networks:
- traefik-public
- smartcity-shared
ports:
- "8123:8123" # HTTP interface (for queries, Grafana)
- "9000:9000" # Native TCP (for clickhouse-client)
volumes:
- clickhouse-data:/var/lib/clickhouse
- ./config.xml:/etc/clickhouse-server/config.d/config.xml:ro
environment:
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=Digitribe972
deploy:
resources:
limits:
memory: 2G
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8123/ping"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.clickhouse.rule=Host(`clickhouse.digitribe.fr')"
- "traefik.http.routers.clickhouse.entrypoints=websecure"
- "traefik.http.routers.clickhouse.tls=true"
- "traefik.http.services.clickhouse.loadbalancer.server.port=8123"
networks:
traefik-public:
external: true
smartcity-shared:
external: true
volumes:
clickhouse-data: