mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
feat(microservices): move getTransportId functions to public variable transportId and make it optional
This commit is contained in:
@@ -38,6 +38,7 @@ export class ServerKafka extends Server implements CustomTransportStrategy {
|
||||
private readonly brokers: string[];
|
||||
private readonly clientId: string;
|
||||
private readonly groupId: string;
|
||||
public readonly transportId: Transport = Transport.KAFKA;
|
||||
|
||||
constructor(private readonly options: KafkaOptions['options']) {
|
||||
super();
|
||||
@@ -63,10 +64,6 @@ export class ServerKafka extends Server implements CustomTransportStrategy {
|
||||
this.initializeDeserializer(options);
|
||||
}
|
||||
|
||||
public getTransport(): number {
|
||||
return Transport.KAFKA;
|
||||
}
|
||||
|
||||
public async listen(callback: () => void): Promise<void> {
|
||||
this.client = this.createClient();
|
||||
await this.start(callback);
|
||||
|
||||
Reference in New Issue
Block a user