Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
fix: auto delete queue for gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazmi35 authored Feb 24, 2024
1 parent 54d5912 commit aa4ec56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/kanao-gateway/src/Structures/KanaoGateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class NezuGateway extends EventEmitter {

// Used for Stats RPC
const rpc = new RoutedQueue(`${GatewayExchangeRoutes.REQUEST}.stats`, clientId, `gateway-rpc-${replicaId}`);
await channel.assertQueue(rpc.queue, { durable: false });
await channel.assertQueue(rpc.queue, { durable: false, autoDelete: true });
await channel.bindQueue(rpc.queue, RabbitMQ.GATEWAY_EXCHANGE, rpc.key);

await channel.consume(rpc.queue, async message => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class ProcessBootstrapper {
const amqpChannel = createAmqpChannel(amqp, {
setup: async (channel: Channel) => {
await channel.assertExchange(RabbitMQ.GATEWAY_EXCHANGE, "topic", { durable: false });
await channel.assertQueue(routing.queue, { durable: false });
await channel.assertQueue(routing.queue, { durable: false, autoDelete: true });
await channel.consume(routing.queue, async m => this.onConsumeMessage(channel, m));
}
});
Expand Down

0 comments on commit aa4ec56

Please sign in to comment.