Skip to content

Commit 48f4232

Browse files
authored
embedded driver config update (#30)
1 parent b803c10 commit 48f4232

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

docs-src/pulsar-sink-core/modules/ROOT/pages/cfgPulsarSettingJavaDriverConfig.adoc

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
= Pass Pulsar Connector settings directly to the DataStax Java driver
1+
= Pass Pulsar Connector settings directly to the Java driver
22
:page-tag: pulsar-connector,dev,develop,pulsar,java
33

4-
In your DataStax Apache Pulsar(TM) Connector configuration file, you can directly pass settings to the DataStax Java driver by using the `datastax-java-driver` prefix.
4+
//Author's note: pulsar-sink uses an embedded Java driver. As of 1.6.14, it uses 4.16.0 (https://github.com/datastax/pulsar-sink/blob/master/pom.xml#L46), which is a pre-donation "DataStax Java driver" version.
5+
6+
In your DataStax Apache Pulsar(TM) Connector configuration file, you can pass settings directly to the embedded Cassandra Java driver by using the `datastax-java-driver` prefix.
57
For example:
68

79
[source,console]
@@ -11,12 +13,7 @@ datastax-java-driver.basic.request.consistency=ALL
1113

1214
== Mapping Pulsar Connector settings to Java driver properties
1315

14-
The following table identifies functionally equivalent DataStax Apache Pulsar Connector and DataStax Java driver settings.
15-
16-
NOTE: If you define both in your configuration, the Pulsar Connector setting take precedence over the `datastax-java-driver.property-name`.
17-
If you do not provide either in your configuration, Pulsar Connector defaults are in effect.
18-
19-
For information about the Java properties, refer to the https://docs.datastax.com/en/developer/java-driver-dse/2.3/manual/core/configuration/[DataStax Java driver documentation.] For information about the Pulsar Connector settings, refer to xref:cfgRefPulsarDseConnection.adoc[].
16+
The following table lists DataStax Apache Pulsar Connector settings and the functionally equivalent Java driver settings:
2017

2118
|===
2219
| DataStax Apache Pulsar Connector setting | Using datastax-java-driver prefix
@@ -43,9 +40,19 @@ For information about the Java properties, refer to the https://docs.datastax.co
4340
| `datastax-java-driver.advanced.metrics.session.cql-requests.highest-latency`
4441
|===
4542

46-
There is a difference between the Pulsar Connector's `contactPoints` setting and the Java driver's `datastax-java-driver.basic.contact-points`.
47-
For `contactPoints`, the value of the `port` is appended to every host provided by this setting.
48-
For `datastax-java-driver.basic.contact-points`, you must provide the fully qualified contact points (`host:port`).
43+
== Precedence of equivalent settings
44+
45+
If you define both in your configuration, the Pulsar Connector setting takes precedence over the equivalent `datastax-java-driver.*` setting.
46+
47+
If you don't specify either setting in your configuration, then the default value for the Pulsar Connector setting is used.
48+
49+
== Difference between contact points settings
50+
51+
There is a difference between the Pulsar Connector's `contactPoints` setting and the Java driver's `datastax-java-driver.basic.contact-points`:
52+
53+
* For `contactPoints`, the value of the `port` is appended to every host provided by this setting.
54+
55+
* For `datastax-java-driver.basic.contact-points`, you must provide the fully qualified contact points (`host:port`).
4956

5057
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.
5158
Example:
@@ -57,7 +64,7 @@ datastax-java-driver.basic.contact-points = 127.0.0.1:9042, 127.0.0.2:90
5764

5865
== Conversion of Java driver properties of type List to TypeSafe Config
5966

60-
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 DataStax Java driver to the `TypeSafe Config` format.
67+
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 `https://docs.datastax.com/en/developer/java-driver/4.16/manual/core/configuration/index.html#default-implementation-typesafe-config[TypeSafe Config]` format:
6168

6269
* `datastax-java-driver.advanced.ssl-engine-factory.cipher-suites`
6370
* `datastax-java-driver.advanced.metrics.node.enabled`
@@ -74,4 +81,8 @@ datastax-java-driver.advanced.metrics.session.enabled.0=a
7481
datastax-java-driver.advanced.metrics.session.enabled.1=b
7582
----
7683

77-
For more information, refer to the https://docs.datastax.com/en/developer/java-driver/4.3/manual/core/configuration/reference/[Java driver reference configuration] topic.
84+
== See also
85+
86+
* xref:cfgRefPulsarDseConnection.adoc[]
87+
* https://docs.datastax.com/en/developer/java-driver/4.16/manual/core/configuration/reference/index.html[Java driver reference.conf]
88+
* https://docs.datastax.com/en/developer/java-driver/4.16/manual/core/configuration/index.html[Java driver configuration]

0 commit comments

Comments
 (0)