0

Micronaut 3.0.2 with io.micronaut.rabbitmq:micronaut-rabbitmq dependency.

I would like to use multiple connections and then use the proposed ChannelPoolListener based on io.micronaut.rabbitmq.connect.ChannelInitializer to create queues/exchanges using a specific connection named configbus.

micronaut:
  application:
    name: micronautRabbitmq
rabbitmq:
  servers:
    configbus:
      uri: amqp://localhost:5672
      username: micronautRabbitmq
      password: micronautRabbitmq
    eventbus:
      uri: amqp://localhost:5671
      username: micronautRabbitmq
      password: micronautRabbitmq

How do I do this?

abedurftig
  • 1,118
  • 1
  • 12
  • 24

2 Answers2

0

You might be just missing the host and port keys there.

See the connections section here: https://micronaut-projects.github.io/micronaut-rabbitmq/latest/guide/#config

0

As of micronaut-rabbitmq:3.1.0 the ChannelInitializer gets the name of the connection. So, whenever the initialize method is called for the desired connection, you can use the channel to create queues, exchanges, bindings, etc.

https://micronaut-projects.github.io/micronaut-rabbitmq/latest/guide/#initialization

abedurftig
  • 1,118
  • 1
  • 12
  • 24