Skip to content

Spring RabbitMQ Client 1.0 Message Conversion in Container Listener #3274

@artembilan

Description

@artembilan

Discussed in #3273

Originally posted by hantsy January 2, 2026
Follow the https://docs.spring.io/spring-amqp/reference/rabbitmq-amqp-client.html to configure RabbitAmqpListenerContainerFactory:

    @Bean(RabbitListenerAnnotationBeanPostProcessor.DEFAULT_RABBIT_LISTENER_CONTAINER_FACTORY_BEAN_NAME)
    RabbitAmqpListenerContainerFactory rabbitAmqpListenerContainerFactory(AmqpConnectionFactory connectionFactory) {
        RabbitAmqpListenerContainerFactory factory = new RabbitAmqpListenerContainerFactory(connectionFactory);
        return factory;
    }

But there is no way to configure a MessageConverter for it.

I have to decode the message payload via generic Message object.

@RabbitListener(queues = RabbitClientConfig.HELLO_QUEUE_NAME,
        concurrency = "2",
        id = "helloListener")
void handleGreeting(Message data) { ... }
```</div>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions