Anand Varkey Philips
Anand Varkey Philips

Reputation: 2075

How to enable seperate connection for consumer in RabbitMQ (Spring Boot)?

I am using spring boot and is looking for some options to enable separate connection for listener via property file configurations as it is told as the best practice.

I have seen this, separate-connection

Is there any example or snippet if needed?

Upvotes: 1

Views: 177

Answers (1)

Gary Russell
Gary Russell

Reputation: 174494

It's not currently available as a property (I suggest you request a new feature as a Boot GitHub issue).

However, you can easily configure it with a custom bean definition, such as:

@Bean
public Object templateConfigurer(RabbitTemplate template) {
    template.setUsePublisherConnection(true);
    return new Object();
}

Upvotes: 1

Related Questions