Skip to content

Commit

Permalink
Delete topic
Browse files Browse the repository at this point in the history
  • Loading branch information
roy-dydx committed Sep 6, 2024
1 parent 0c7327a commit b5095b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion indexer/packages/kafka/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export enum KafkaTopics {
TO_ENDER = 'to-ender',
TO_VULCAN = 'to-vulcan',
TO_WEBSOCKETS_ORDERBOOKS = 'to-websockets-orderbooks',
TO_WEBSOCKETS_SUBACCOUNTS = 'to-websockets-subaccounts-1',
TO_WEBSOCKETS_SUBACCOUNTS = 'to-websockets-subaccounts',
TO_WEBSOCKETS_TRADES = 'to-websockets-trades',
TO_WEBSOCKETS_MARKETS = 'to-websockets-markets',
TO_WEBSOCKETS_CANDLES = 'to-websockets-candles',
Expand Down
8 changes: 8 additions & 0 deletions indexer/services/bazooka/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@ async function createKafkaTopics(
): Promise<void> {
const kafkaTopicsToCreate: KafkaTopics[] = [];

await admin.deleteTopics({
topics: [KafkaTopics.TO_WEBSOCKETS_SUBACCOUNTS],
})
logger.info({
at: 'index#createKafkaTopics',
message: `Deleted ${KafkaTopics.TO_WEBSOCKETS_SUBACCOUNTS}`,
});

_.forEach(KAFKA_TOPICS, (kafkaTopic: KafkaTopics) => {
if (_.includes(existingKafkaTopics, kafkaTopic)) {
logger.info({
Expand Down

0 comments on commit b5095b0

Please sign in to comment.