diff --git a/indexer/packages/kafka/src/types.ts b/indexer/packages/kafka/src/types.ts index 88ad872120b..27b0b3e9933 100644 --- a/indexer/packages/kafka/src/types.ts +++ b/indexer/packages/kafka/src/types.ts @@ -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', diff --git a/indexer/services/bazooka/src/index.ts b/indexer/services/bazooka/src/index.ts index d353397fe8e..7e73a31b875 100644 --- a/indexer/services/bazooka/src/index.ts +++ b/indexer/services/bazooka/src/index.ts @@ -195,6 +195,14 @@ async function createKafkaTopics( ): Promise { 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({