Consumer as the background process
🧾 Consumer as a Background Process
✅ Enabling or Disabling Consumers
new AmqpChannelConfig({
name: 'amqp-command.channel',
connectionUri: 'amqp://guest:guest@localhost:5672/',
exchangeName: 'book_shop.exchange',
bindingKeys: ['book_shop.#'],
exchangeType: ExchangeType.TOPIC,
queue: 'book_shop.command',
enableConsumer: process.env.CONSUMER_ENABLED === 'true' ?? false, // ← starts the background consumer
})⚙️ Running the Consumer as a Dedicated Microservice
🔁 From HTTP App to Microservice Consumer
✅ Microservice Consumer Entry
Last updated
Was this helpful?