feature(microservices): update acceptable types in RabbitMq options

This commit is contained in:
ccappai
2020-10-29 10:28:24 +01:00
parent b8c479ebe5
commit f51b8f820b
2 changed files with 4 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import { Server } from '../server/server';
import { CustomTransportStrategy } from './custom-transport-strategy.interface';
import { Deserializer } from './deserializer.interface';
import { Serializer } from './serializer.interface';
import {RmqUrl} from "../external/rmq-url.interface";
export type MicroserviceOptions =
| GrpcOptions
@@ -119,7 +120,7 @@ export interface NatsOptions {
export interface RmqOptions {
transport?: Transport.RMQ;
options?: {
urls?: any[];
urls?: RmqUrl[] | string[];
queue?: string;
prefetchCount?: number;
isGlobalPrefetchCount?: boolean;

View File

@@ -20,6 +20,7 @@ import {
OutgoingResponse,
} from '../interfaces/packet.interface';
import { Server } from './server';
import {RmqUrl} from "../external/rmq-url.interface";
let rqmPackage: any = {};
@@ -28,7 +29,7 @@ export class ServerRMQ extends Server implements CustomTransportStrategy {
protected server: any = null;
protected channel: any = null;
protected readonly urls: string[];
protected readonly urls: string[] | RmqUrl[];
protected readonly queue: string;
protected readonly prefetchCount: number;
protected readonly queueOptions: any;