@alexknips/nestjs-kafka-events
Version:
Lightweight, tested, straight-forward wrapper around KafkaJS and Confluent's Schema Registry.
15 lines • 920 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSchemaRegistryKeySubjectByTopic = exports.getSchemaRegistryValueSubjectByTopic = exports.TOPIC_SUBJECT_KEY_SUFFIX = exports.TOPIC_SUBJECT_VALUE_SUFFIX = exports.TOPIC_SUBJECT_SEPARATOR = void 0;
exports.TOPIC_SUBJECT_SEPARATOR = '-';
exports.TOPIC_SUBJECT_VALUE_SUFFIX = 'value';
exports.TOPIC_SUBJECT_KEY_SUFFIX = 'key';
const getSchemaRegistryValueSubjectByTopic = (topic) => {
return topic + exports.TOPIC_SUBJECT_SEPARATOR + exports.TOPIC_SUBJECT_VALUE_SUFFIX;
};
exports.getSchemaRegistryValueSubjectByTopic = getSchemaRegistryValueSubjectByTopic;
const getSchemaRegistryKeySubjectByTopic = (topic) => {
return topic + exports.TOPIC_SUBJECT_SEPARATOR + exports.TOPIC_SUBJECT_KEY_SUFFIX;
};
exports.getSchemaRegistryKeySubjectByTopic = getSchemaRegistryKeySubjectByTopic;
//# sourceMappingURL=topic-subject.helper.js.map