Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
Is it possible 1 application consume multiples exchanges?

What i have to do is consume 2 diferents queues in rabbitMQ, each one in a diferent vhost and diferent exchange.

Do i have to create 2 connections? is it possíble?

My .env is something like this:

CONSUMER_DIRECT_HOST=localhost
CONSUMER_DIRECT_VHOST=pd_logs
CONSUMER_DIRECT_LOGIN=guest
CONSUMER_DIRECT_PASSWORD=guest
CONSUMER_DIRECT_PORT=5672
CONSUMER_DIRECT_TYPE=direct
CONSUMER_DIRECT_QUEUE=queue-notification
CONSUMER_DIRECT_EXCHANGE=direct-notification
CONSUMER_DIRECT_ROUTING_KEY=callback
CONSUMER_PAYMENTS_HOST=localhost
CONSUMER_PAYMENTS_VHOST=/
CONSUMER_PAYMENTS_LOGIN=guest
CONSUMER_PAYMENTS_PASSWORD=guest
CONSUMER_PAYMENTS_PORT=5672
CONSUMER_PAYMENTS_TYPE=direct
CONSUMER_PAYMENTS_QUEUE=queue-payment-notification
CONSUMER_PAYMENTS_EXCHANGE=x-payment-events
CONSUMER_PAYMENTS_ROUTING_KEY=callback

I think i must have 2 applications, one for each vhost. I was thinking to have the same applications, just with diferent environment configuration.

Is not what i want, but i dont know how to do, is it possible?

I tried to create 2 connections at the same time, but it didnt work, or i implemented it wrong.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!