rh-integration / IntegrationApp-Automation

Sample Integration application along with lifecycle automation
Apache License 2.0
13 stars 9 forks source link

fuse-alert-service seems to create new connection to messaging broker for every message sent #31

Closed jirkadanek closed 5 years ago

jirkadanek commented 5 years ago

It appears that fuse-alert-service is not keeping a connection to broker open, in some connection pool, maybe.

There is a section in amq documentation that opening new connection for every message sent is an antipattern.

jirkadanek commented 5 years ago

@rvais @osmman so what I wrote in the issue is not true, camel is actually keeping some producers open, yes? And we saw evidence of it in broker console, on the Consumers tab (because those producers themselves listen on advisory topic).

osmman commented 5 years ago

Camel doesn't provide any connection pools. They have to be configured manually by developers [1] or created by an application server like Spring Boot, EAP or Karaf.

In Spring Boot, the connection pool is created automatically by JMS autoconfiguration [2].

[1] https://github.com/FuseByExample/esb-transactions/blob/jboss-fuse-6.3.0/routing/src/main/resources/OSGI-INF/blueprint/routing.xml#L65-L68 [2] https://github.com/spring-projects/spring-boot/tree/v1.5.18.RELEASE/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq