mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore(): resolve conflicts
This commit is contained in:
@@ -39,6 +39,7 @@ export class ServerKafka extends Server implements CustomTransportStrategy {
|
||||
protected client: Kafka = null;
|
||||
protected consumer: Consumer = null;
|
||||
protected producer: Producer = null;
|
||||
protected parser: KafkaParser = null;
|
||||
|
||||
protected brokers: string[] | BrokersFunction;
|
||||
protected clientId: string;
|
||||
@@ -66,6 +67,8 @@ export class ServerKafka extends Server implements CustomTransportStrategy {
|
||||
require('kafkajs'),
|
||||
);
|
||||
|
||||
this.parser = new KafkaParser((options && options.parser) || undefined);
|
||||
|
||||
this.initializeSerializer(options);
|
||||
this.initializeDeserializer(options);
|
||||
}
|
||||
@@ -143,7 +146,7 @@ export class ServerKafka extends Server implements CustomTransportStrategy {
|
||||
|
||||
public async handleMessage(payload: EachMessagePayload) {
|
||||
const channel = payload.topic;
|
||||
const rawMessage = KafkaParser.parse<KafkaMessage>(
|
||||
const rawMessage = this.parser.parse<KafkaMessage>(
|
||||
Object.assign(payload.message, {
|
||||
topic: payload.topic,
|
||||
partition: payload.partition,
|
||||
|
||||
Reference in New Issue
Block a user