Skip to content

Commit

Permalink
chore(): resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Nov 2, 2020
2 parents bef63a7 + 0af826e commit b8c6373
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/microservices/client/client-kafka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { KafkaHeaders } from '../enums';
import { InvalidKafkaClientTopicPartitionException } from '../errors/invalid-kafka-client-topic-partition.exception';
import { InvalidKafkaClientTopicException } from '../errors/invalid-kafka-client-topic.exception';
import {
BrokersFunction,
Consumer,
ConsumerConfig,
ConsumerGroupJoinEvent,
Expand Down Expand Up @@ -47,7 +48,7 @@ export class ClientKafka extends ClientProxy {
protected responsePatterns: string[] = [];
protected consumerAssignments: { [key: string]: number[] } = {};

protected brokers: string[];
protected brokers: string[] | BrokersFunction;
protected clientId: string;
protected groupId: string;

Expand Down
6 changes: 4 additions & 2 deletions packages/microservices/external/kafka-options.interface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="node" />

import * as tls from 'tls';
import * as net from 'net';
import * as tls from 'tls';

type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
type XOR<T, U> = T | U extends object
Expand All @@ -16,8 +16,10 @@ export declare class Kafka {
logger(): Logger;
}

export type BrokersFunction = () => string[] | Promise<string[]>;

export interface KafkaConfig {
brokers: string[];
brokers: string[] | BrokersFunction;
ssl?: tls.ConnectionOptions | boolean;
sasl?: SASLOptions;
clientId?: string;
Expand Down
5 changes: 4 additions & 1 deletion packages/microservices/external/kafka.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ export declare class Kafka {
logger(): Logger;
}

export type BrokersFunction = () => string[] | Promise<string[]>;

export interface KafkaConfig {
brokers: string[];
brokers: string[] | BrokersFunction;
ssl?: tls.ConnectionOptions | boolean;
sasl?: SASLOptions;
clientId?: string;
connectionTimeout?: number;
authenticationTimeout?: number;
reauthenticationThreshold?: number;
requestTimeout?: number;
enforceRequestTimeout?: boolean;
retry?: RetryOptions;
Expand Down
3 changes: 2 additions & 1 deletion packages/microservices/server/server-kafka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { KafkaContext } from '../ctx-host';
import { KafkaHeaders, Transport } from '../enums';
import {
BrokersFunction,
Consumer,
ConsumerConfig,
EachMessagePayload,
Expand Down Expand Up @@ -38,7 +39,7 @@ export class ServerKafka extends Server implements CustomTransportStrategy {
protected consumer: Consumer = null;
protected producer: Producer = null;

protected brokers: string[];
protected brokers: string[] | BrokersFunction;
protected clientId: string;
protected groupId: string;

Expand Down

0 comments on commit b8c6373

Please sign in to comment.