Skip to content

Commit

Permalink
Revert consumer.ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
DemianParkhomenko committed Jun 11, 2024
1 parent 9f9c133 commit 92e0027
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ export async function consumeMessages<Message extends IMessage>(
queueName: ConsumeMessagesConfig | string,
handler: MessageHandler<Message>
) {
console.log('📍 consumeMessages', queueName);
let prefetch: number | undefined;
const channel = await getDefaultChannel();
if (typeof queueName !== 'string') {
if (!queueName.queues || queueName.queues.length !== 1) {
throw new Error(
Expand All @@ -135,6 +133,7 @@ export async function consumeMessages<Message extends IMessage>(
}
}

const channel = await getDefaultChannel();
const queue = getMessageBusConfig().queues.find((q) => q.name === queueName);
const consumerTag = `${
process.env.HOSTNAME || 'no.env.HOSTNAME'
Expand Down

0 comments on commit 92e0027

Please sign in to comment.