Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda