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
Copy file name to clipboardExpand all lines: README.md
+16-24Lines changed: 16 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@ kafka-connect-mq-source is a [Kafka Connect](http://kafka.apache.org/documentati
3
3
4
4
The connector is supplied as source code which you can easily build into a JAR file.
5
5
6
+
**Note**: A sink connector for IBM MQ is also available on [GitHub](https://github.com/ibm-messaging/kafka-connect-mq-sink).
7
+
6
8
## Contents
7
9
8
10
-[Building the connector](#building-the-connector)
@@ -20,7 +22,7 @@ The connector is supplied as source code which you can easily build into a JAR f
20
22
## Building the connector
21
23
To build the connector, you must have the following installed:
22
24
*[git](https://git-scm.com/)
23
-
*[Maven](https://maven.apache.org)
25
+
*[Maven 3.0 or later](https://maven.apache.org)
24
26
* Java 8 or later
25
27
26
28
Clone the repository with the following command:
@@ -38,24 +40,26 @@ Build the connector using Maven:
38
40
mvn clean package
39
41
```
40
42
41
-
Once built, the output is a single JAR called `target/kafka-connect-mq-source-1.0-SNAPSHOT-jar-with-dependencies.jar` which contains all of the required dependencies.
43
+
Once built, the output is a single JAR called `target/kafka-connect-mq-source-<version>-jar-with-dependencies.jar` which contains all of the required dependencies.
42
44
43
45
44
46
## Running the connector
45
47
46
-
**NOTE:** For a more detailed guide to running the connector see the [IBM Event Streams documentation](https://ibm.github.io/event-streams/connecting/mq/).
48
+
For step-by-step instructions, see the following guides for running the connector:
49
+
- connecting to Apache Kafka [running locally](UsingMQWithKafkaConnect.md)
50
+
- connecting to an installation of [IBM Event Streams](https://ibm.github.io/event-streams/connecting/mq/source)
47
51
48
52
To run the connector, you must have:
49
53
* The JAR from building the connector
50
54
* A properties file containing the configuration for the connector
51
-
* Apache Kafka 1.0 or later, either standalone or included as part of an offering such as IBM Event Streams
55
+
* Apache Kafka 2.0.0 or later, either standalone or included as part of an offering such as IBM Event Streams
52
56
* IBM MQ v8 or later, or the IBM MQ on Cloud service
53
57
54
58
The connector can be run in a Kafka Connect worker in either standalone (single process) or distributed mode. It's a good idea to start in standalone mode.
55
59
56
60
You need two configuration files, one for the configuration that applies to all of the connectors such as the Kafka bootstrap servers, and another for the configuration specific to the MQ source connector such as the connection information for your queue manager. For the former, the Kafka distribution includes a file called `connect-standalone.properties` that you can use as a starting point. For the latter, you can use `config/mq-source.properties` in this repository.
57
61
58
-
The connector connects to MQ using a client connection. You must provide the name of the queue manager, the connection name (one or more host/port pairs) and the channel name. In addition, you can provide a user name and password if the queue manager is configured to require them for client connections. If you look at the supplied `config/mq-source.properties`, you'll see how to specify the configuration required.
62
+
The connector connects to MQ using either a client or a bindings connection. For a client connection, you must provide the name of the queue manager, the connection name (one or more host/port pairs) and the channel name. In addition, you can provide a user name and password if the queue manager is configured to require them for client connections. If you look at the supplied `config/mq-source.properties`, you'll see how to specify the configuration required. For a bindings connection, you must provide provide the name of the queue manager and also run the Kafka Connect worker on the same system as the queue manager.
59
63
60
64
To run the connector in standalone mode from the directory into which you installed Apache Kafka, you use a command like this:
61
65
@@ -140,7 +144,7 @@ In MQ, the message ID and correlation ID are both 24-byte arrays. As strings, th
140
144
The connector supports authentication with user name and password and also connections secured with TLS using a server-side certificate and mutual authentication with client-side certificates.
141
145
142
146
### Setting up MQ connectivity using TLS with a server-side certificate
143
-
To enable use of TLS, set the configuration `mq.ssl.cipher.suite` to the name of the cipher suite which matches the CipherSpec in the SSLCIPH attribute of the MQ server-connection channel. Use the table of supported cipher suites for MQ 9.1 [here] ((https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.dev.doc/q113220_.htm) as a reference. Note that the names of the CipherSpecs as used in the MQ configuration are not necessarily the same as the cipher suite names that the connector uses. The connector uses the JMS interface so it follows the Java conventions.
147
+
To enable use of TLS, set the configuration `mq.ssl.cipher.suite` to the name of the cipher suite which matches the CipherSpec in the SSLCIPH attribute of the MQ server-connection channel. Use the table of supported cipher suites for MQ 9.1 [here](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.dev.doc/q113220_.htm) as a reference. Note that the names of the CipherSpecs as used in the MQ configuration are not necessarily the same as the cipher suite names that the connector uses. The connector uses the JMS interface so it follows the Java conventions.
144
148
145
149
You will need to put the public part of the queue manager's certificate in the JSSE truststore used by the Kafka Connect worker that you're using to run the connector. If you need to specify extra arguments to the worker's JVM, you can use the EXTRA_ARGS environment variable.
146
150
@@ -165,6 +169,7 @@ The configuration options for the Kafka Connect source connector for IBM MQ are
165
169
| Name | Description | Type | Default | Valid values |
| mq.queue.manager | The name of the MQ queue manager | string || MQ queue manager name |
172
+
| mq.connection.mode | The connection mode - bindings or client | string | client | client, bindings |
168
173
| mq.connection.name.list | List of connection names for queue manager | string || host(port)[,host(port),...]|
169
174
| mq.channel.name | The name of the server-connection channel | string || MQ channel name |
170
175
| mq.queue | The name of the source MQ queue | string || MQ queue name |
@@ -179,14 +184,14 @@ The configuration options for the Kafka Connect source connector for IBM MQ are
179
184
| topic | The name of the target Kafka topic | string || Topic name |
180
185
181
186
### Using a CCDT file
182
-
Some of the connection details for MQ can be provided in a [CCDT file](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.con.doc/q016730_.htm) by setting `mq.ccdt.url` in the Kafka Connect source connector configuration file. If using a CCDT file the `mq.connection.name.list` and `mq.channel.name` configuration options are not required.
187
+
Some of the connection details for MQ can be provided in a [CCDT file](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.con.doc/q016730_.htm) by setting `mq.ccdt.url` in the Kafka Connect source connector configuration file. If using a CCDT file the `mq.connection.name.list` and `mq.channel.name` configuration options are not required.
183
188
184
189
### Externalizing secrets
185
190
[KIP 297](https://cwiki.apache.org/confluence/display/KAFKA/KIP-297%3A+Externalizing+Secrets+for+Connect+Configurations) introduced a mechanism to externalize secrets to be used as configuration for Kafka connectors.
186
191
187
192
#### Example: externalizing secrets with FileConfigProvider
188
193
189
-
Given a file `secrets.properties` with the contents:
194
+
Given a file `mq-secrets.properties` with the contents:
190
195
```
191
196
secret-key=password
192
197
```
@@ -206,28 +211,15 @@ Update the connector configuration file to reference `secret-key` in the file:
# Other ConfigProvider implementations might require parameters passed in to configure() as follows:
218
-
config.providers.other-provider.param.foo=value1
219
-
config.providers.other-provider.param.bar=value2
220
-
```
221
-
222
214
## Troubleshooting
223
215
224
216
### Unable to connect to Kafka
225
217
226
-
You may receive an `org.apache.kafka.common.errors.SslAuthenticationException: SSL handshake failed` error when trying to run the MQ Source Connector using SSL to connect to your Kafka cluster. In the case that the error is caused by the following exception: `Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching XXXXX found.`, Java may be replacing the IP address of your cluster with the corresponding hostname in your `/etc/hosts` file. For example, to push Docker images to your ICP cluster, you may add an entry in this file which corresponds to the IP of your cluster e.g. `123.456.78.90 mycluster.icp`. To fix this, you can comment out this line in your `/etc/hosts` file.
218
+
You may receive an `org.apache.kafka.common.errors.SslAuthenticationException: SSL handshake failed` error when trying to run the MQ Source Connector using SSL to connect to your Kafka cluster. In the case that the error is caused by the following exception: `Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching XXXXX found.`, Java may be replacing the IP address of your cluster with the corresponding hostname in your `/etc/hosts` file. For example, to push Docker images to a custom Docker repository, you may add an entry in this file which corresponds to the IP of your repository e.g. `123.456.78.90 mycluster.icp`. To fix this, you can comment out this line in your `/etc/hosts` file.
227
219
228
220
229
221
## Support
230
-
A commercially supported version of this connector is available for customers with a support entitlement for [IBM Event Streams](https://developer.ibm.com/messaging/event-streams/).
222
+
A commercially supported version of this connector is available for customers with a support entitlement for [IBM Event Streams](https://www.ibm.com/cloud/event-streams).
231
223
232
224
233
225
## Issues and contributions
@@ -247,4 +239,4 @@ Unless required by applicable law or agreed to in writing, software
247
239
distributed under the License is distributed on an "AS IS" BASIS,
248
240
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
249
241
See the License for the specific language governing permissions and
250
-
limitations under the License.The project is licensed under the Apache 2 license.
242
+
limitations under the License.The project is licensed under the Apache 2 license.
0 commit comments