You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 regels
2.0 KiB

  1. #!/bin/bash
  2. # Retention: messages older than 2 days are deleted (172800000 ms = 2 days)
  3. RETENTION_MS=172800000
  4. # create topic rawbeacons
  5. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  6. --create --if-not-exists --topic rawbeacons \
  7. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS
  8. # create topic apibeacons
  9. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  10. --create --if-not-exists --topic apibeacons \
  11. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS
  12. # create topic alertBeacons
  13. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  14. --create --if-not-exists --topic alertbeacons \
  15. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS
  16. # create topic locevents
  17. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  18. --create --if-not-exists --topic locevents \
  19. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS
  20. # create topic settings
  21. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  22. --create --if-not-exists --topic settings \
  23. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS
  24. # create topic alert
  25. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  26. --create --if-not-exists --topic alert \
  27. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS
  28. # create topic healthlocation
  29. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  30. --create --if-not-exists --topic healthlocation \
  31. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS
  32. # create topic healthdecoder
  33. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  34. --create --if-not-exists --topic healthdecoder \
  35. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS
  36. # create topic healthbridge
  37. /opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 \
  38. --create --if-not-exists --topic healthbridge \
  39. --partitions 1 --replication-factor 1 --config retention.ms=$RETENTION_MS