0

I have the following consumer for rabbitmq :

    @Incoming("incoming-msg")
    @Blocking(ordered = false, value = "my-worker-pool")
    public Uni<Void> onExecutionReceive(final Message<JsonObject> message) {
        message.ack();
        .. do some stuff
        return Uni.createFrom().voidItem();
    }

with smallrye.messaging.worker.my-worker-pool.max-concurrency=3

With this configuration, I have only 3 messages process at the same time. The problem is that if I send let's say 5 messages the two non process messages will be in the queue in non acknowledge status instead of ready which prevent other consumer to take them.

How can i limit my channel to only those 3 messages and let other messages to ready status. I have tried : mp.messaging.incoming.incoming-msgmax-outstanding-messages=1.

With such parameter, it limits number of non acknowledge messages to 1, but it is not what i want (all messages ready except those 3 processing).

How can I do that ? Is it possible ? If not which strategy should i use for one consumer to let messages available if he is not able to process them ?

user1549094
  • 21
  • 1
  • 4

0 Answers0