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

Commit

Permalink
chore: use exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Feb 22, 2024
1 parent 6a37bb6 commit c7e993c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions services/kanao-cache/src/Structures/KanaoCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export class KanaoCache extends EventEmitter {

public async setupAmqp(channel: Channel): Promise<void> {
await channel.prefetch(1);
await channel.assertExchange("nezu-gateway.cache", "direct", { durable: true });
const { queue } = await channel.assertQueue("kanao-cache.receive", { durable: true });
await channel.bindQueue(queue, "nezu-gateway.cache", clientId);

this.logger.info("Successfully bind to cache queue!");

Expand Down
3 changes: 0 additions & 3 deletions services/kanao-gateway/src/Structures/KanaoGateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ export class NezuGateway extends EventEmitter {
const amqpChannel = createAmqpChannel(amqp, {
setup: async (channel: Channel) => {
await channel.assertExchange("nezu-gateway.cache", "direct", { durable: true });
await channel.assertQueue("kanao-cache.receive", { durable: true });
await channel.bindQueue("kanao-cache.receive", "nezu-gateway.cache", clientId);

await channel.assertExchange(RabbitMQ.GATEWAY_QUEUE_STATS, "topic", { durable: false });

const { queue } = await channel.assertQueue("", { exclusive: true });
Expand Down

0 comments on commit c7e993c

Please sign in to comment.