You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Alessandro Hoss <al...@gmail.com> on 2019/12/04 17:59:42 UTC

Too many connections with Camel and RabbitMQ

Hello,

I'm using camel 2.24.2 with camel-rabbitmq in Spring Boot, and I've noticed
camel is opening one connection per consumer, plus another connection per
producer.

Actually I'm having troubles with rabbitmq going down because of too many
connections opened (5000+ connections)

Is there a way that camel can reuse the same connection for its components?

Thanks for any help.
-- 
Alessandro Hoss

Re: Too many connections with Camel and RabbitMQ

Posted by Alessandro Hoss <al...@gmail.com>.
Hi,

I did a lot of searches without success on finding a way of doing this.
I've also tried using CachingConnectionFactory from spring-rabbit, but it
doesn't work since it should be an instance
of com.rabbitmq.client.ConnectionFactory.

Do you happen to have an example?

Thanks for the help.

Em qui., 5 de dez. de 2019 às 01:28, Claus Ibsen <cl...@gmail.com>
escreveu:

> Hi
>
> Sounds like you need to configure some connection pooling. Usually you
> setup some pooling and configure this to the ConnectionFactory.
>
> Try to search for rabbitmq pooled connection factory
>
> On Wed, Dec 4, 2019 at 7:00 PM Alessandro Hoss <al...@gmail.com> wrote:
> >
> > Hello,
> >
> > I'm using camel 2.24.2 with camel-rabbitmq in Spring Boot, and I've
> noticed
> > camel is opening one connection per consumer, plus another connection per
> > producer.
> >
> > Actually I'm having troubles with rabbitmq going down because of too many
> > connections opened (5000+ connections)
> >
> > Is there a way that camel can reuse the same connection for its
> components?
> >
> > Thanks for any help.
> > --
> > Alessandro Hoss
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


-- 
Alessandro Hoss

Re: Too many connections with Camel and RabbitMQ

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Sounds like you need to configure some connection pooling. Usually you
setup some pooling and configure this to the ConnectionFactory.

Try to search for rabbitmq pooled connection factory

On Wed, Dec 4, 2019 at 7:00 PM Alessandro Hoss <al...@gmail.com> wrote:
>
> Hello,
>
> I'm using camel 2.24.2 with camel-rabbitmq in Spring Boot, and I've noticed
> camel is opening one connection per consumer, plus another connection per
> producer.
>
> Actually I'm having troubles with rabbitmq going down because of too many
> connections opened (5000+ connections)
>
> Is there a way that camel can reuse the same connection for its components?
>
> Thanks for any help.
> --
> Alessandro Hoss



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2