Mehran
Mehran

Reputation: 16851

Can I / Should I pool neo4j's JDBC connections in Bolt mode?

Reading the neo4j JDBC's documentation, there are two transports supported for connecting to a neo4j server at the moment:

  • through the Bolt protocol (3.0.X) using jdbc:neo4j:bolt://:/

  • through the HTTP protocol (2.X+) using jdbc:neo4j:http://:/

Obviously, the HTTP protocol does not need pooling connections (unless it's HTTP/2 which is not the case here). But I'm not familiar with Bolt so I'm wondering if I can pool neo4j's connections in Bolt mode? And if I can, is it like any ordinary JDBC connection and I can use, for example, HikariCP to keep its connections alive?

Upvotes: 1

Views: 660

Answers (1)

logisima
logisima

Reputation: 7478

Neo4j driver handles for you a pool of connection to the database. Take a look here if you want to see the default config : https://github.com/neo4j/neo4j-java-driver/blob/1.1/driver/src/main/java/org/neo4j/driver/internal/net/pooling/PoolSettings.java

For now, you can't configure the bolt java driver via the JDBC one, you can only specify the EncryptionLevel. (https://github.com/neo4j-contrib/neo4j-jdbc/blob/master/neo4j-jdbc-bolt/src/main/java/org/neo4j/jdbc/bolt/BoltDriver.java#L58-L60)

Cheers

Upvotes: 1

Related Questions