RabbitMq Consumer not working because micronaut assigns executor threads to kafka consumer

130 Views Asked by At

I am running kafka in micronaut v3.4.3 in Kotlin and recently I integrated RabbitMq with the server using micronaut-rabbitmq v3.4.0. In the docs it is mentioned to specify the executors for the RabbitMq consumers in application.yml.

Now when the server starts, since the kafka listeners are already using the executor threads indefinitely RabbitMq consumers are not able to get a lock on those threads.

So, Is there a way to segregate consumer executor threads for both kafka and RabbitMq?

1

There are 1 best solutions below

0
On

I got the answer, the thing was that I needed to specify different consumer executor threads for both RabbitMq and Kafka.

This is how I did that by adding this in my yml file.

micronaut:
  executors:
    rabbit:
      type: FIXED
    consumer:
      type: FIXED

and and in the micronaut configuration

rabbitmq:
  uri: amqp://guest@localhost:5672
  consumer-executor: rabbit