mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
feature(microservices): update acceptable types in RabbitMq options
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user