You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then build and install the connector to the Confluent Platform indicated by your $CONFLUENT_HOME environment variable:
114
-
115
-
./gradlew clean installConnectorInConfluent
116
-
117
-
Note that any time you modify the MarkLogic Kafka connector code, you'll need to repeat the
118
-
`./gradlew clean installConnectorInConfluent` step. Note that `clean` is included to ensure that in case you've changed
119
-
any connector dependencies, old dependencies will not be included in the connector archive.
120
-
121
-
Next, start Confluent:
113
+
You can now visit http://localhost:9021 to access [Confluent's Control Center](https://docs.confluent.io/platform/current/control-center/index.html) application.
122
114
123
-
confluent local services start
124
-
125
-
To verify that your Confluent installation is running properly, you can run `confluent local services status` and
126
-
see logging similar to this:
127
-
128
-
```
129
-
Connect is [UP]
130
-
Control Center is [UP]
131
-
Kafka is [UP]
132
-
Kafka REST is [UP]
133
-
ksqlDB Server is [UP]
134
-
Schema Registry is [UP]
135
-
ZooKeeper is [UP]
136
-
```
115
+
Within Control Center, click on "controlcenter.cluster" to access the configuration for the Kafka cluster.
137
116
138
-
You can now visit http://localhost:9021 to access [Confluent's Control Center](https://docs.confluent.io/platform/current/control-center/index.html)
139
-
application.
117
+
### Build and install the MarkLogic Kafka Connector
118
+
1. Build the connectorArchive target using ```./gradlew installConnectorInConfluent```.
119
+
2. Restart the "connect" server in the Docker "confluent-platform-example" cluster.
120
+
3. Verify the connector has loaded properly.
121
+
1. Click on "Connect" in the left sidebar.
122
+
2. Click on the "connect-default" cluster.
123
+
3. Click on the "+ Add connector" tile.
124
+
4. The "Browse" screen should several tiles including "MarkLogicSinkConnector" and "MarkLogicSourceConnector".
140
125
141
-
Within Control Center, click on "controlcenter.cluster" to access the configuration for the Kafka cluster.
142
126
127
+
### Install the test application on the MarkLogic server in the Docker cluster
128
+
In the project root directory, run ```./gradlew -i mlDeploy```
143
129
144
130
## Load a Datagen connector instance
145
131
146
-
To test out the MarkLogic Kafka connector, you should first load an instance of the [Kafka Datagen connector]
147
-
(https://github.com/confluentinc/kafka-connect-datagen). The Datagen connector is a Kafka source connector that can
148
-
generate test data which can then be fed to the MarkLogic Kafka connector. The following Gradle command will automate
149
-
loading an instance of the Datagen connector that will write JSON messages to a `purchases` topic every second:
132
+
### Via Gradle
133
+
```./gradlew -i loadDatagenPurchasesConnector```
150
134
151
-
./gradlew loadDatagenPurchasesConnector
135
+
### Via curl
136
+
```curl -X POST -H "Content-Type: application/json" --data @src/test/resources/confluent/datagen-purchases-source.json http://localhost:8083/connectors```
152
137
138
+
### Verifying the new connector instance
153
139
In the Control Center GUI, you can verify the Datagen connector instance:
154
140
155
141
1. Click on "Connect" in the left sidebar
@@ -164,12 +150,13 @@ Additionally, you can examine the data sent by the Datagen connector to the `pur
164
150
165
151
## Load a MarkLogic Kafka sink connector instance
166
152
167
-
Next, load an instance of the MarkLogic Kafka connector that will read data from the `purchases` topic and write
168
-
it to MarkLogic. The `src/test/resources/confluent/marklogic-purchases-sink.json` file defines the connection
169
-
properties for MarkLogic. You can adjust this file to suit your testing needs.
0 commit comments