Pass Pulsar Connector settings directly to the Java driver

In your DataStax Apache Pulsar™ Connector configuration file, you can pass settings directly to the embedded Cassandra Java driver by using the datastax-java-driver prefix. For example:

datastax-java-driver.basic.request.consistency=ALL

Mapping Pulsar Connector settings to Java driver properties

The following table lists DataStax Apache Pulsar Connector settings and the functionally equivalent Java driver settings:

DataStax Apache Pulsar Connector setting Using datastax-java-driver prefix

contactPoints

datastax-java-driver.basic.contact-points

loadBalancing.localDc

datastax-java-driver.basic.load-balancing-policy.local-datacenter

cloud.secureConnectBundle

datastax-java-driver.basic.cloud.secure-connect-bundle

queryExecutionTimeout

datastax-java-driver.basic.request.timeout

connectionPoolLocalSize

datastax-java-driver.advanced.connection.pool.local.size

compression

datastax-java-driver.advanced.protocol.compression

metricsHighestLatency

datastax-java-driver.advanced.metrics.session.cql-requests.highest-latency

Precedence of equivalent settings

If you define both in your configuration, the Pulsar Connector setting takes precedence over the equivalent datastax-java-driver.* setting.

If you don’t specify either setting in your configuration, then the default value for the Pulsar Connector setting is used.

Difference between contact points settings

There is a difference between the Pulsar Connector’s contactPoints setting and the Java driver’s datastax-java-driver.basic.contact-points:

  • For contactPoints, the value of the port is appended to every host provided by this setting.

  • For datastax-java-driver.basic.contact-points, you must provide the fully qualified contact points (host:port).

By passing in the Java driver’s setting, this option gives you more configuration flexibility because you can specify a different port for each host. Example:

datastax-java-driver.basic.contact-points = 127.0.0.1:9042, 127.0.0.2:90

Conversion of Java driver properties of type List to TypeSafe Config

The following properties that are of type List, which you could pass into the driver from your Pulsar Connector configuration via the datastax-java-driver prefix, are converted by the Java driver to the TypeSafe Config format:

  • datastax-java-driver.advanced.ssl-engine-factory.cipher-suites

  • datastax-java-driver.advanced.metrics.node.enabled

  • datastax-java-driver.advanced.metadata.schema.refreshed-keyspaces

  • datastax-java-driver.advanced.metrics.session.enabled

  • datastax-java-driver.basic.contact-points

The conversion by the Java driver will split the comma-separated values provided in those setting to create indexed properties. For example, if you passed in datastax-java-driver.advanced.metrics.session.enabled=a,b, the entry is converted to:

datastax-java-driver.advanced.metrics.session.enabled.0=a
datastax-java-driver.advanced.metrics.session.enabled.1=b

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com