-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: new config to control constants in JMSWorker #141
base: main
Are you sure you want to change the base?
feat: new config to control constants in JMSWorker #141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for picking this up - I've got a few minor comments, but functionally this is looking great
@@ -57,7 +57,7 @@ body: | |||
label: Version | |||
description: What version of our software are you running? | |||
options: | |||
- 2.2.0 (Default) | |||
- 2.2.1 (Default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 2.2.1 (Default) | |
- 2.3.0 (Default) |
IMO, when doing semver, the patch number is for bug fixes, but new (compatible) features should increment the minor number.
@@ -20,7 +20,7 @@ | |||
<groupId>com.ibm.eventstreams.connect</groupId> | |||
<artifactId>kafka-connect-mq-source</artifactId> | |||
<packaging>jar</packaging> | |||
<version>2.2.0</version> | |||
<version>2.2.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<version>2.2.1</version> | |
<version>2.3.0</version> |
rationale as above
README.md
Outdated
@@ -305,6 +305,9 @@ The configuration options for the Kafka Connect source connector for IBM MQ are | |||
| mq.message.mqmd.read | Whether to enable reading of all MQMD fields | boolean | false | | | |||
| mq.max.poll.blocked.time.ms | How long the connector will wait for the previous batch of messages to be delivered to Kafka before starting a new poll | integer | 2000 | It is important that this is less than the time defined for `task.shutdown.graceful.timeout.ms` as that is how long connect will wait for the task to perform lifecycle operations. | | |||
| mq.client.reconnect.options | Options governing MQ reconnection. | string | ASDEF | ASDEF, ANY, QMGR, DISABLED | | |||
| mq.jms.receive.timeout | The timeout in milliseconds for receiving messages from JMS Consumer. | long | 2000L | 1 or greater | | |||
| mq.jms.reconnect.delay.min.ms | The minimum delay in milliseconds for reconnect attempts. | long | 64L | 1 or greater | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a risk that users will misunderstand this and confuse it with the JMS client reconnect feature - https://www.ibm.com/docs/en/ibm-mq/9.2?topic=reconnection-using-automatic-jms-client
It's unfortunate, because the name you've used is absolutely the most obvious and logical name. But I think we should name it differently to make it clear that this is how long the connector will pause after an exception before it tries again.
(Also, I recommend removing the "L" from the default value, as above)
README.md
Outdated
@@ -305,6 +305,9 @@ The configuration options for the Kafka Connect source connector for IBM MQ are | |||
| mq.message.mqmd.read | Whether to enable reading of all MQMD fields | boolean | false | | | |||
| mq.max.poll.blocked.time.ms | How long the connector will wait for the previous batch of messages to be delivered to Kafka before starting a new poll | integer | 2000 | It is important that this is less than the time defined for `task.shutdown.graceful.timeout.ms` as that is how long connect will wait for the task to perform lifecycle operations. | | |||
| mq.client.reconnect.options | Options governing MQ reconnection. | string | ASDEF | ASDEF, ANY, QMGR, DISABLED | | |||
| mq.jms.receive.timeout | The timeout in milliseconds for receiving messages from JMS Consumer. | long | 2000L | 1 or greater | | |||
| mq.jms.reconnect.delay.min.ms | The minimum delay in milliseconds for reconnect attempts. | long | 64L | 1 or greater | | |||
| mq.jms.reconnect.delay.max.ms | The maximum delay in milliseconds for reconnect attempts. | long | 8192L | 1 or greater | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(same comment as for the min value above)
@@ -175,7 +190,7 @@ public class MQSourceConnector extends SourceConnector { | |||
CONFIG_VALUE_MQ_CLIENT_RECONNECT_OPTION_DISABLED.toLowerCase(Locale.ENGLISH) | |||
}; | |||
|
|||
public static String version = "2.2.0"; | |||
public static String version = "2.2.1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static String version = "2.2.1"; | |
public static String version = "2.3.0"; |
as above
@@ -531,6 +546,30 @@ null, new ReadableFile(), | |||
CONFIG_GROUP_MQ, 25, | |||
Width.SHORT, | |||
CONFIG_DISPLAY_MQ_CLIENT_RECONNECT_OPTIONS); | |||
CONFIGDEF.define(CONFIG_MAX_RECEIVE_TIMEOUT, | |||
Type.LONG, | |||
CONFIG_MAX_RECEIVE_TIMEOUT_DEFAULT, ConfigDef.Range.atLeast(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a different minimum to what you've specified in the README.
Did you mean to allow the value 0?
CONFIG_DISPLAY_MAX_RECEIVE_TIMEOUT); | ||
CONFIGDEF.define(CONFIG_RECONNECT_DELAY_MIN, | ||
Type.LONG, | ||
CONFIG_RECONNECT_DELAY_MIN_DEFAULT, ConfigDef.Range.atLeast(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a different minimum to what you've specified in the README.
Did you mean to allow the value 0?
CONFIG_DISPLAY_RECONNECT_DELAY_MIN); | ||
CONFIGDEF.define(CONFIG_RECONNECT_DELAY_MAX, | ||
Type.LONG, | ||
CONFIG_RECONNECT_DELAY_MAX_DEFAULT, ConfigDef.Range.atLeast(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a different minimum to what you've specified in the README.
Did you mean to allow the value 0?
- New config for JMS receive timeout - New config for JMS reconnect minimum delay - New config for JMS reconnect maximum delay Signed-off-by: Joel Hanson <[email protected]>
b5c0a4a
to
be56af6
Compare
feat: new config to control constants in JMSWorker
Description
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist