This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate-topics.sh
executable file
·37 lines (31 loc) · 2.45 KB
/
create-topics.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# send-application: 30 days retention, 11 Mb messages
/kafka/bin/kafka-topics.sh --zookeeper=$ZOOKEEPER_CONNECT --create --if-not-exists \
--partitions=1 --replication-factor=1 --topic=send-application
/kafka/bin/kafka-configs.sh --zookeeper=$ZOOKEEPER_CONNECT --alter --entity-type=topics \
--entity-name=send-application --add-config 'cleanup.policy=delete,retention.ms=2592000000,max.message.bytes=11534336'
# send-confirmation: 5 days retention, 1 Mb messages
/kafka/bin/kafka-topics.sh --zookeeper=$ZOOKEEPER_CONNECT --create --if-not-exists \
--partitions=1 --replication-factor=1 --topic=send-confirmation
/kafka/bin/kafka-configs.sh --zookeeper=$ZOOKEEPER_CONNECT --alter --entity-type=topics \
--entity-name=send-confirmation --add-config 'cleanup.policy=delete,retention.ms=432000000,max.message.bytes=1048576'
# forward-to-memo: 30 days retention, 1 Mb messages
/kafka/bin/kafka-topics.sh --zookeeper=$ZOOKEEPER_CONNECT --create --if-not-exists \
--partitions=1 --replication-factor=1 --topic=forward-to-memo
/kafka/bin/kafka-configs.sh --zookeeper=$ZOOKEEPER_CONNECT --alter --entity-type=topics \
--entity-name=forward-to-memo --add-config 'cleanup.policy=delete,retention.ms=2592000000,max.message.bytes=1048576'
# forward-to-ami: 30 days retention, 1 Mb messages
/kafka/bin/kafka-topics.sh --zookeeper=$ZOOKEEPER_CONNECT --create --if-not-exists \
--partitions=1 --replication-factor=1 --topic=forward-to-ami
/kafka/bin/kafka-configs.sh --zookeeper=$ZOOKEEPER_CONNECT --alter --entity-type=topics \
--entity-name=forward-to-ami --add-config 'cleanup.policy=delete,retention.ms=2592000000,max.message.bytes=1048576'
# send-answer: 5 days retention, 1 Mb messages
/kafka/bin/kafka-topics.sh --zookeeper=$ZOOKEEPER_CONNECT --create --if-not-exists \
--partitions=1 --replication-factor=1 --topic=send-answer
/kafka/bin/kafka-configs.sh --zookeeper=$ZOOKEEPER_CONNECT --alter --entity-type=topics \
--entity-name=send-answer --add-config 'cleanup.policy=delete,retention.ms=432000000,max.message.bytes=1048576'
# process-email-event: 10 days retention, 1 Mb messages
/kafka/bin/kafka-topics.sh --zookeeper=$ZOOKEEPER_CONNECT --create --if-not-exists \
--partitions=1 --replication-factor=1 --topic=process-email-event
/kafka/bin/kafka-configs.sh --zookeeper=$ZOOKEEPER_CONNECT --alter --entity-type=topics \
--entity-name=process-email-event --add-config 'cleanup.policy=delete,retention.ms=864000000,max.message.bytes=1048576'