Skip to content

Commit

Permalink
Merge b0088db into 15bbd74
Browse files Browse the repository at this point in the history
  • Loading branch information
Upperfoot committed Mar 20, 2019
2 parents 15bbd74 + b0088db commit 9651613
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions integration/microservices/e2e/sum-rmq.spec.ts
Expand Up @@ -23,6 +23,7 @@ describe('RabbitMQ transport', () => {
urls: [`amqp://localhost:5672`],
queue: 'test',
queueOptions: { durable: false },
socketOptions: { noDelay: true },
},
});
await app.startAllMicroservicesAsync();
Expand Down
Expand Up @@ -19,6 +19,7 @@ export class RMQBroadcastController {
urls: [`amqp://localhost:5672`],
queue: 'test_broadcast',
queueOptions: { durable: false },
socketOptions: { noDelay: true },
},
});
}
Expand Down
1 change: 1 addition & 0 deletions integration/microservices/src/rmq/rmq.controller.ts
Expand Up @@ -22,6 +22,7 @@ export class RMQController {
urls: [`amqp://localhost:5672`],
queue: 'test',
queueOptions: { durable: false },
socketOptions: { noDelay: true },
},
});
}
Expand Down
Expand Up @@ -89,5 +89,6 @@ export interface RmqOptions {
prefetchCount?: number;
isGlobalPrefetchCount?: boolean;
queueOptions?: any;
socketOptions?: any;
};
}
3 changes: 2 additions & 1 deletion packages/microservices/client/client-rmq.ts
Expand Up @@ -92,7 +92,8 @@ export class ClientRMQ extends ClientProxy {
}

public createClient<T = any>(): T {
return rqmPackage.connect(this.urls) as T;
const socketOptions = this.getOptionsProp<RmqOptions>(this.options, 'socketOptions');
return rqmPackage.connect(this.urls, socketOptions) as T;
}

public mergeDisconnectEvent<T = any>(
Expand Down
Expand Up @@ -93,5 +93,6 @@ export interface RmqOptions {
prefetchCount?: number;
isGlobalPrefetchCount?: boolean;
queueOptions?: any;
socketOptions?: any;
};
}
3 changes: 2 additions & 1 deletion packages/microservices/server/server-rmq.ts
Expand Up @@ -75,7 +75,8 @@ export class ServerRMQ extends Server implements CustomTransportStrategy {
}

public createClient<T = any>(): T {
return rqmPackage.connect(this.urls);
const socketOptions = this.getOptionsProp<RmqOptions>(this.options, 'socketOptions');
return rqmPackage.connect(this.urls, socketOptions);
}

public async setupChannel(channel: any, callback: Function) {
Expand Down

0 comments on commit 9651613

Please sign in to comment.