Skip to content

Commit f593b57

Browse files
authored
fix: fix topic templates (#524)
1 parent ad69074 commit f593b57

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/containers/Tenant/utils/queryTemplates.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -69,42 +69,42 @@ export const createTopicTemplate = (path: string) => {
6969
return `-- docs: https://ydb.tech/en/docs/yql/reference/syntax/create_topic
7070
CREATE TOPIC \`${path}/my_topic\` (
7171
CONSUMER consumer1,
72-
CONSUMER consumer2 WITH (read_from = Datetime('2022-12-01T12:13:22Z')) -- Sets up the message write time starting from which the consumer will receive data.
72+
CONSUMER consumer2 WITH (read_from = Datetime('1970-01-01T00:00:00Z')) -- Sets up the message write time starting from which the consumer will receive data.
7373
-- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format).
7474
-- Default value: now
7575
) WITH (
76-
min_active_partitions = 5, -- Minimum number of topic partitions.
77-
partition_count_limit = 10, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited.
78-
retention_period = Interval('PT12H'), -- Data retention period in the topic. Value type: Interval, default value: 18h.
79-
retention_storage_mb = 1, -- Limit on the maximum disk space occupied by the topic data.
76+
min_active_partitions = 1, -- Minimum number of topic partitions.
77+
partition_count_limit = 0, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited.
78+
retention_period = Interval('PT18H'), -- Data retention period in the topic. Value type: Interval.
79+
retention_storage_mb = 0, -- Limit on the maximum disk space occupied by the topic data.
8080
-- When this value is exceeded, the older data is cleared, like under a retention policy.
8181
-- 0 is interpreted as unlimited.
82-
partition_write_speed_bytes_per_second = 2097152, -- Maximum allowed write speed per partition.
83-
partition_write_burst_bytes = 2097152 -- Write quota allocated for write bursts.
84-
-- When set to zero, the actual write_burst value is equalled to
85-
-- the quota value (this allows write bursts of up to one second).
82+
partition_write_speed_bytes_per_second = 1048576, -- Maximum allowed write speed per partition.
83+
partition_write_burst_bytes = 0 -- Write quota allocated for write bursts.
84+
-- When set to zero, the actual write_burst value is equalled to
85+
-- the quota value (this allows write bursts of up to one second).
8686
);`;
8787
};
8888

8989
export const alterTopicTemplate = (path: string) => {
9090
return `-- docs: https://ydb.tech/en/docs/yql/reference/syntax/alter_topic
9191
ALTER TOPIC \`${path}\`
92-
ADD CONSUMER new_consumer WITH (read_from = 0), -- Sets up the message write time starting from which the consumer will receive data.
93-
-- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format).
94-
-- Default value: now
95-
ALTER CONSUMER consumer1 SET (read_from = Datetime('2023-12-01T12:13:22Z')),
92+
ADD CONSUMER new_consumer WITH (read_from = Datetime('1970-01-01T00:00:00Z')), -- Sets up the message write time starting from which the consumer will receive data.
93+
-- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format).
94+
-- Default value: now
95+
ALTER CONSUMER consumer1 SET (read_from = Datetime('1970-01-01T00:00:00Z')),
9696
DROP CONSUMER consumer2,
9797
SET (
98-
min_active_partitions = 10, -- Minimum number of topic partitions.
99-
partition_count_limit = 15, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited.
100-
retention_period = Interval('PT36H'), -- Data retention period in the topic. Value type: Interval, default value: 18h.
101-
retention_storage_mb = 10, -- Limit on the maximum disk space occupied by the topic data.
102-
-- When this value is exceeded, the older data is cleared, like under a retention policy.
103-
-- 0 is interpreted as unlimited.
104-
partition_write_speed_bytes_per_second = 3145728, -- Maximum allowed write speed per partition.
105-
partition_write_burst_bytes = 1048576 -- Write quota allocated for write bursts.
106-
-- When set to zero, the actual write_burst value is equalled to
107-
-- the quota value (this allows write bursts of up to one second).
98+
min_active_partitions = 1, -- Minimum number of topic partitions.
99+
partition_count_limit = 0, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited.
100+
retention_period = Interval('PT18H'), -- Data retention period in the topic. Value type: Interval.
101+
retention_storage_mb = 0, -- Limit on the maximum disk space occupied by the topic data.
102+
-- When this value is exceeded, the older data is cleared, like under a retention policy.
103+
-- 0 is interpreted as unlimited.
104+
partition_write_speed_bytes_per_second = 1048576, -- Maximum allowed write speed per partition.
105+
partition_write_burst_bytes = 0 -- Write quota allocated for write bursts.
106+
-- When set to zero, the actual write_burst value is equalled to
107+
-- the quota value (this allows write bursts of up to one second).
108108
);`;
109109
};
110110

0 commit comments

Comments
 (0)