Skip to content

Insufficient downstream requests to emit item while using Emitter to publish message on rabbitMQ #3064

@nitinty

Description

@nitinty

Hi Team,

I'm getting below error while pushing messages rabbitMQ using Emitter while triggering the performance run of our application

I was going through documentation found some overflow management but in that case it uses in memory buffer. However, if service pods restart while messages are in the buffer, these events would be lost and never pushed back to the queue. Could you please suggest a workaround to prevent message loss ?

https://quarkus.io/blog/reactive-messaging-emitter/#overflow-management

SRMSG00034: Insufficient downstream requests to emit item

Note: Previously, our application was developed using Spring Boot, and I never encountered this issue. This might be because Spring uses multiple channels to publish messages.

    @Inject
    @Channel("tenant-producer")
    Emitter<Employee> emitter;

    public void send(String tenantRoutingKey) {
        OutgoingRabbitMQMetadata metadata = OutgoingRabbitMQMetadata.builder()
                .withRoutingKey(tenantRoutingKey)
                .withHeaders(Map.of("tenant_id", "test"))
                .build();

        Employee employee = new Employee();
        employee.setName("John Doe");
        employee.setEmail("[email protected]");
        emitter.send(Message.of(employee).addMetadata(metadata));
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions