Skip to content

Commit

Permalink
Update to version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Schofield authored and Andrew Schofield committed Oct 24, 2019
1 parent ca68ca1 commit 023e533
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 23 deletions.
31 changes: 15 additions & 16 deletions UsingMQwithKafkaConnect.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,60 +34,59 @@ It is assumed that you have installed MQ, you're logged in as a user authorized
crtmqm -p 1414 MYQM
```

1. Start the queue manager:
2. Start the queue manager:
``` shell
strmqm MYQM
```

1. Start the `runmqsc` tool to configure the queue manager:
3. Start the `runmqsc` tool to configure the queue manager:
``` shell
runmqsc MYQM
```

1. In `runmqsc`, create a server-connection channel:
4. In `runmqsc`, create a server-connection channel:
```
DEFINE CHANNEL(MYSVRCONN) CHLTYPE(SVRCONN)
```

1. Set the channel authentication rules to accept connections requiring userid and password:
5. Set the channel authentication rules to accept connections requiring userid and password:
```
SET CHLAUTH(MYSVRCONN) TYPE(BLOCKUSER) USERLIST('nobody')
SET CHLAUTH('*') TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(NOACCESS)
SET CHLAUTH(MYSVRCONN) TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(CHANNEL) CHCKCLNT(REQUIRED)
```

1. Set the identity of the client connections based on the supplied context, the user ID:
6. Set the identity of the client connections based on the supplied context, the user ID:
```
ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) ADOPTCTX(YES)
```

1. Refresh the connection authentication information:
7. Refresh the connection authentication information:
```
REFRESH SECURITY TYPE(CONNAUTH)
```

1. Create a queue for the connector to use:
8. Create a queue for the connector to use:
```
DEFINE QLOCAL(MYQSINK)
```

1. Authorize `alice` to connect to and inquire the queue manager:
9. Authorize `alice` to connect to and inquire the queue manager:
```
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('alice') AUTHADD(CONNECT,INQ)
```

1. Finally authorize `alice` to use the queue:
10. Finally authorize `alice` to use the queue:
```
SET AUTHREC PROFILE(MYQSINK) OBJTYPE(QUEUE) PRINCIPAL('alice') AUTHADD(ALLMQI)
```

1. End `runmqsc`:
11. End `runmqsc`:
```
END
```

The queue manager is now ready to accept connection from Kafka Connect connectors.

The queue manager is now ready to accept connection from Kafka Connect connectors.

### Download and set up Apache Kafka
These instructions assume you have Apache Kafka downloaded and running locally. See the [Apache Kafka quickstart guide](https://kafka.apache.org/quickstart) for more details.
Expand All @@ -97,12 +96,12 @@ These instructions assume you have Apache Kafka downloaded and running locally.
bin/zookeeper-server-start.sh config/zookeeper.properties
```

1. In another terminal, start a Kafka server:
2. In another terminal, start a Kafka server:
``` shell
bin/kafka-server-start.sh config/server.properties
```

1. Create a topic called `TSINK` for the connector to pull event from:
3. Create a topic called `TSINK` for the connector to pull event from:
``` shell
bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic TSINK --partitions 1 --replication-factor 1
```
Expand Down Expand Up @@ -134,7 +133,7 @@ Configure and run the connector:
cp config/mq-sink.properties ~
```

1. Edit the following properties in the `~/mq-sink.properties` to match the configuration so far:
2. Edit the following properties in the `~/mq-sink.properties` to match the configuration so far:
```
topics=TSINK
mq.queue.manager=MYQM
Expand All @@ -145,7 +144,7 @@ Configure and run the connector:
mq.password=passw0rd
```

1. Change directory to the Kafka root directory. Start the connector worker replacing `<connector-root-directory>` and `<version>` with your directory and the connector version:
3. Change directory to the Kafka root directory. Start the connector worker replacing `<connector-root-directory>` and `<version>` with your directory and the connector version:
``` shell
CLASSPATH=<connector-root-directory>/target/kafka-connect-mq-sink-<version>-jar-with-dependencies.jar ./bin/connect-standalone.sh config/connect-standalone.properties ~/mq-sink.properties
```
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<groupId>com.ibm.eventstreams.connect</groupId>
<artifactId>kafka-connect-mq-sink</artifactId>
<packaging>jar</packaging>
<version>1.1.0</version>
<version>1.1.1</version>
<name>kafka-connect-mq-sink</name>
<organization>
<name>IBM Corporation</name>
Expand All @@ -45,13 +45,13 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<version>2.0.0</version>
<version>2.3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-json</artifactId>
<version>2.0.0</version>
<version>2.3.0</version>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public class MQSinkConnector extends SinkConnector {
public static final String CONFIG_DOCUMENTATION_MQ_REPLY_QUEUE = "The name of the reply-to queue, as a queue name or URI.";
public static final String CONFIG_DISPLAY_MQ_REPLY_QUEUE = "Reply-to queue";

public static String VERSION = "1.1.0";
public static String VERSION = "1.1.1";

private Map<String, String> configProps;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2017, 2018 IBM Corporation
* Copyright 2017, 2018, 2019 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2017, 2018 IBM Corporation
* Copyright 2017, 2018, 2019 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2017 IBM Corporation
# Copyright 2017, 2018, 2019 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 023e533

Please sign in to comment.