Skip to content

Neo4j Connection URI#

liquibase-neo4j accepts only URI in the JDBC format.

Supported schemes#

Only connections through the Bolt protocol variants are supported. Connections through HTTP or embedded are not supported by the extension.

  • jdbc:neo4j:bolt://host:port is supported
  • jdbc:neo4j:bolt+s://host:port is supported
  • jdbc:neo4j:bolt+ssc://host:port is supported
  • jdbc:neo4j:neo4j://host:port is supported
  • jdbc:neo4j:neo4j+s://host:port is supported
  • jdbc:neo4j:neo4j+ssc://host:port is supported
  • jdbc:neo4j:http://host:port is NOT supported
  • jdbc:neo4j:https://host:port is NOT supported
  • jdbc:neo4j:file:///path/to/neo4j is NOT supported

Read more about what each URI scheme means in the Neo4j driver manual.

Detailed configuration#

Until version 4.18.0.1 included#

Until version 4.18.0.1 (included), this plugin relied on the external JDBC connector. Its configuration parameters are detailed here.

After version 4.18.0.1#

The plugin now relies on its own purpose-built JDBC connector. Its configuration parameters are compatible with the ones linked above.

Important

Some of the above settings are not supported yet. If you happen to need one of them, please open an issue and describe why it is needed in your situation.

Setting                                                          Description Allowed values                                                                             URL? Properties? Remarks
database Sets database name Any valid database name yes yes This setting is only available for Neo4j 4+ servers
nossl Disables encryption - [empty]
- "true"
yes yes "false" has no effect.
Using this setting in conjunction with encryption or with an incompatible URI scheme is unspecified.
Favour the appropriate URL scheme instead (bolt or neo4j)
encryption Sets whether the traffic should be encrypted - [empty]
- "true"
- "false"
yes yes Using this setting in conjunction with nossl is unspecified. Favour the appropriate URL scheme instead
trust.strategy Configures how the underlying driver handles certificates - "TRUST_ALL_CERTIFICATES"
- "TRUST_CUSTOM_CA_SIGNED_CERTIFICATES"
- "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"
yes yes "TRUST_CUSTOM_CA_SIGNED_CERTIFICATES" requires the setting "trusted.certificate.file"
trusted.certificate.file Custom certificate file name A valid path yes yes Only used in combination with the "TRUST_CUSTOM_CA_SIGNED_CERTIFICATES" trust strategy
connection.acquisition.timeout Sets the maximum amount of time it takes for the full connection pool to acquire a connection Any integer value yes yes The value is in milliseconds.
connection.liveness.check.timeout Sets the threshold after which idle connections are tested for liveness before they are acquired again Any integer value yes yes The value is in minutes.
connection.timeout Sets the socket connection timeout Any positive integer value yes yes
leaked.sessions.logging Enables leaked sessions logging (i.e. sessions not properly closed, leaking underlying connections leading to OOM) - [empty]
- "true"
yes yes "false" has no effect
max.connection.lifetime Sets the threshold after which a connection is not acquired again Any integer value yes yes The value is in milliseconds
max.connection.poolsize Sets the maximum size of the underlying driver's connection pool Any integer value yes yes
max.transaction.retry.time Sets the maximum time transaction can be retried Any positive integer value yes yes The value is in milliseconds.
This setting is currently ineffective since the purpose-built JDBC connector does not rely on transaction functions
fetch.size Sets the number of records per batch to fetch -1 or any strictly positive integer value yes yes This setting is only available for Neo4j 4+ servers
-1 disables batching (and lead to memory issues, use with caution)
impersonated.user Sets the username to impersonate Any valid username yes yes This setting is only available for Neo4j 4.4+ servers

Important

  • Setting names are normalized to lower case (per the English locale case rules).
  • If a setting is expressed both via URL and properties, the setting specified by URL has higher precedence.
  • URL settings without value are considered equivalent to boolean flags with value true.