pulsar-jms icon indicating copy to clipboard operation
pulsar-jms copied to clipboard

Connection optimization for JBOSS Consumers.

Open akhil1000 opened this issue 2 years ago • 3 comments

Currently, we are seeing a high number of connections on the Broker so see if you can optimize.

We would like to have a way to control the number of connections or sessions using MaxSessions.

akhil1000 avatar Oct 03 '22 07:10 akhil1000

How any MDBs you have ?

for each MDS (endPoint) we try to re-use the same PulsarConnectionFactory. The PulsarConnectionFactory holds an instance of the Java Pulsar Client, that maintains the pool of connections.

https://github.com/datastax/pulsar-jms/blob/e59d6d0fb682eb741e8ad84705aedc81730303eb/resource-adapter/src/main/java/com/datastax/oss/pulsar/jms/rar/PulsarResourceAdapter.java#L97

Are you configuring the MDBs with the same "Configuration" ? if you have the same configuration and you simply change the destination I would expect that you have only one PulsarClient.

Each PulsarClient opens only 1 connection to each broker se connectionsPerBroker configuration

eolivelli avatar Oct 03 '22 07:10 eolivelli

I do not see anything logged for below line log.info( "Activate endpoint {} {} configuration {}",

Is there a way we can log - number of Connectionfactories/Sessions and other metrics in resource adapter to collect the meterics ?

akhil1000 avatar Oct 03 '22 18:10 akhil1000

There are around 990 MDBs

akhil1000 avatar Oct 03 '22 23:10 akhil1000