Skip to content

Commit 09d967c

Browse files
Merge pull request #15 from ibm-messaging/1.0.1
Version 1.0.1
2 parents 222a723 + 0a48642 commit 09d967c

File tree

8 files changed

+256
-260
lines changed

8 files changed

+256
-260
lines changed

README.md

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ kafka-connect-mq-source is a [Kafka Connect](http://kafka.apache.org/documentati
33

44
The connector is supplied as source code which you can easily build into a JAR file.
55

6+
**Note**: A sink connector for IBM MQ is also available on [GitHub](https://github.com/ibm-messaging/kafka-connect-mq-sink).
7+
68
## Contents
79

810
- [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
2022
## Building the connector
2123
To build the connector, you must have the following installed:
2224
* [git](https://git-scm.com/)
23-
* [Maven](https://maven.apache.org)
25+
* [Maven 3.0 or later](https://maven.apache.org)
2426
* Java 8 or later
2527

2628
Clone the repository with the following command:
@@ -38,24 +40,26 @@ Build the connector using Maven:
3840
mvn clean package
3941
```
4042

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.
4244

4345

4446
## Running the connector
4547

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)
4751

4852
To run the connector, you must have:
4953
* The JAR from building the connector
5054
* 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
5256
* IBM MQ v8 or later, or the IBM MQ on Cloud service
5357

5458
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.
5559

5660
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.
5761

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.
5963

6064
To run the connector in standalone mode from the directory into which you installed Apache Kafka, you use a command like this:
6165

@@ -140,7 +144,7 @@ In MQ, the message ID and correlation ID are both 24-byte arrays. As strings, th
140144
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.
141145

142146
### 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.
144148

145149
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.
146150

@@ -165,6 +169,7 @@ The configuration options for the Kafka Connect source connector for IBM MQ are
165169
| Name | Description | Type | Default | Valid values |
166170
| ---------------------------- | ----------------------------------------------------------- | ------- | ------------- | ------------------------------------------------------- |
167171
| 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 |
168173
| mq.connection.name.list | List of connection names for queue manager | string | | host(port)[,host(port),...] |
169174
| mq.channel.name | The name of the server-connection channel | string | | MQ channel name |
170175
| 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
179184
| topic | The name of the target Kafka topic | string | | Topic name |
180185

181186
### 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.
183188

184189
### Externalizing secrets
185190
[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.
186191

187192
#### Example: externalizing secrets with FileConfigProvider
188193

189-
Given a file `secrets.properties` with the contents:
194+
Given a file `mq-secrets.properties` with the contents:
190195
```
191196
secret-key=password
192197
```
@@ -206,28 +211,15 @@ Update the connector configuration file to reference `secret-key` in the file:
206211
mq.password=${file:mq-secret.properties:secret-key}
207212
```
208213

209-
#### Using custom Config Providers
210-
211-
Custom config providers can also be enabled in the worker configuration file:
212-
```
213-
# Additional properties for the worker configuration to enable use of ConfigProviders
214-
# multiple comma-separated provider types can be specified here
215-
config.providers=file,other-provider
216-
config.providers.file.class=org.apache.kafka.common.config.provider.FileConfigProvider
217-
# 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-
222214
## Troubleshooting
223215

224216
### Unable to connect to Kafka
225217

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.
227219

228220

229221
## 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).
231223

232224

233225
## Issues and contributions
@@ -247,4 +239,4 @@ Unless required by applicable law or agreed to in writing, software
247239
distributed under the License is distributed on an "AS IS" BASIS,
248240
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
249241
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

Comments
 (0)