UNPKG

kafka-retry

Version:

Handle kafka non-blocking retries and dead letter topics for nestjs microservice

11 lines (7 loc) 411 B
import { TopicSuffixingStrategy } from './constants'; export const getRetryTopicName = (topicName: any, index: any) => `${topicName}${TopicSuffixingStrategy.RETRY_SUFFIX}-${index}`; export const getDeadTopicName = (topicName: any) => `${topicName}${TopicSuffixingStrategy.DLT_SUFFIX}`; export const getPatternRetryTopic = (topicName: any) => `${topicName}${TopicSuffixingStrategy.RETRY_SUFFIX}-[1-9]`;