Skip to content

Commit

Permalink
fix(microservices): include discarded rmq client options
Browse files Browse the repository at this point in the history
all other properties, beside 'connectionOptions', from the socketOptions object ( of type AmqpConnectionManagerSocketOptions )
were being discarded on the creation of the AmqpConnectionManager client
https://github.com/nestjs/nest/blob/master/packages/microservices/external/rmq-url.interface.ts#L47
https://github.com/jwalton/node-amqp-connection-manager/blob/v4.1.14/src/AmqpConnectionManager.ts#L46

nestjs#5788 (comment)
  • Loading branch information
v-sum committed Oct 8, 2024
1 parent 9825529 commit 9cd4353
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/microservices/client/client-rmq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ export class ClientRMQ extends ClientProxy {

public createClient(): AmqpConnectionManager {
const socketOptions = this.getOptionsProp(this.options, 'socketOptions');
return rmqPackage.connect(this.urls, {
connectionOptions: socketOptions?.connectionOptions,
});
return rmqPackage.connect(this.urls, socketOptions);
}

public mergeDisconnectEvent<T = any>(
Expand Down

0 comments on commit 9cd4353

Please sign in to comment.