Skip to content

Commit 5c4aab4

Browse files
committed
fix: revert renaming of config for receive timeout
Signed-off-by: Joel Hanson <joelhanson025@gmail.com>
1 parent 310ad2a commit 5c4aab4

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ The configuration options for the Kafka Connect source connector for IBM MQ are
305305
| mq.message.mqmd.read | Whether to enable reading of all MQMD fields | boolean | false | |
306306
| 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. |
307307
| mq.client.reconnect.options | Options governing MQ reconnection. | string | ASDEF | ASDEF, ANY, QMGR, DISABLED |
308-
| mq.receive.timeout.ms | The timeout (in milliseconds) for receiving messages from the queue manager before returning to Kafka Connect. | long | 2000 | 1 or greater |
308+
| mq.receive.timeout.ms | The timeout (in milliseconds) for the first request to receiving messages from the queue manager before returning to Kafka Connect. | long | 2000 | 1 or greater |
309309
| mq.receive.subsequent.timeout.ms | The timeout (in milliseconds) for receiving messages from the queue manager on the subsequent receives before returning to Kafka Connect. | long | 0 | 1 or greater |
310310
| mq.reconnect.delay.min.ms | The minimum delay (in milliseconds) for reconnecting to the queue manager after a connection error. | long | 64 | 1 or greater |
311311
| mq.reconnect.delay.max.ms | The maximum delay (in milliseconds) for reconnecting to the queue manager after a connection error. | long | 8192 | 1 or greater |

src/integration/java/com/ibm/eventstreams/connect/mqsource/MQSourceTaskIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private Map<String, String> createDefaultConnectorProperties() {
8686
props.put("mq.queue", DEFAULT_SOURCE_QUEUE);
8787
props.put("mq.user.authentication.mqcsp", "false");
8888
props.put("topic", "mytopic");
89-
props.put("mq.receive.timeout.ms", "5000");
89+
props.put("mq.message.receive.timeout", "5000");
9090
props.put("mq.receive.subsequent.timeout.ms", "2000");
9191
props.put("mq.reconnect.delay.min.ms", "100");
9292
props.put("mq.reconnect.delay.max.ms", "10000");
@@ -667,7 +667,7 @@ public void testJmsWorkerWithCustomReciveForConsumerAndCustomReconnectValues() t
667667
connectorConfigProps.put("mq.message.body.jms", "true");
668668
connectorConfigProps.put("mq.record.builder",
669669
"com.ibm.eventstreams.connect.mqsource.builders.DefaultRecordBuilder");
670-
connectorConfigProps.put("mq.receive.timeout.ms", "2000");
670+
connectorConfigProps.put("mq.message.receive.timeout", "2000");
671671
connectorConfigProps.put("mq.receive.subsequent.timeout.ms", "3000");
672672
connectorConfigProps.put("mq.reconnect.delay.min.ms", "100");
673673
connectorConfigProps.put("mq.reconnect.delay.max.ms", "10000");

src/main/java/com/ibm/eventstreams/connect/mqsource/JMSWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class JMSWorker {
7171
private boolean connected = false; // Whether connected to MQ
7272
private AtomicBoolean closeNow; // Whether close has been requested
7373
private AbstractConfig config;
74-
private long initialReceiveTimeoutMs; // Receive timeout for the jms consumer
74+
private long initialReceiveTimeoutMs; // Receive timeout for the jms consumer on the first call in each Connect poll
7575
private long subsequentReceiveTimeoutMs; // Receive timeout for the jms consumer on the subsequent calls
7676
private long reconnectDelayMillisMin; // Delay between repeated reconnect attempts min
7777
private long reconnectDelayMillisMax; // Delay between repeated reconnect attempts max

src/main/java/com/ibm/eventstreams/connect/mqsource/MQSourceConnector.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public class MQSourceConnector extends SourceConnector {
163163
public static final String CONFIG_VALUE_MQ_CLIENT_RECONNECT_OPTION_DISABLED = "DISABLED";
164164
public static final String CONFIG_VALUE_MQ_CLIENT_RECONNECT_OPTION_ASDEF = "ASDEF";
165165

166-
public static final String CONFIG_MAX_RECEIVE_TIMEOUT = "mq.receive.timeout.ms";
166+
public static final String CONFIG_MAX_RECEIVE_TIMEOUT = "mq.message.receive.timeout";
167167
public static final String CONFIG_DOCUMENTATION_MAX_RECEIVE_TIMEOUT = "How long the connector should wait (in milliseconds) for a message to arrive if no message is available immediately";
168168
public static final String CONFIG_DISPLAY_MAX_RECEIVE_TIMEOUT = "Initial receive timeout (ms)";
169169
public static final long CONFIG_MAX_RECEIVE_TIMEOUT_DEFAULT = 2000L;
@@ -172,18 +172,18 @@ public class MQSourceConnector extends SourceConnector {
172172
public static final String CONFIG_SUBSEQUENT_RECEIVE_TIMEOUT = "mq.receive.subsequent.timeout.ms";
173173
public static final String CONFIG_DOCUMENTATION_SUBSEQUENT_RECEIVE_TIMEOUT = "How long (in milliseconds) the connector should wait for subsequent receives, "
174174
+ "defaults to 0 (no-wait) and uses receiveNoWait().";
175-
public static final String CONFIG_DISPLAY_SUBSEQUENT_RECEIVE_TIMEOUT = "subsequent receive timeout (ms)";
175+
public static final String CONFIG_DISPLAY_SUBSEQUENT_RECEIVE_TIMEOUT = "Subsequent receive timeout (ms)";
176176
public static final long CONFIG_SUBSEQUENT_RECEIVE_TIMEOUT_DEFAULT = 0L;
177177

178178
public static final String CONFIG_RECONNECT_DELAY_MIN = "mq.reconnect.delay.min.ms";
179179
public static final String CONFIG_DOCUMENTATION_RECONNECT_DELAY_MIN = "The minimum delay in milliseconds for reconnect attempts.";
180-
public static final String CONFIG_DISPLAY_RECONNECT_DELAY_MIN = "reconnect minimum delay";
180+
public static final String CONFIG_DISPLAY_RECONNECT_DELAY_MIN = "Reconnect minimum delay";
181181
public static final long CONFIG_RECONNECT_DELAY_MIN_DEFAULT = 64L;
182182
public static final long CONFIG_RECONNECT_DELAY_MIN_MINIMUM = 1L;
183183

184184
public static final String CONFIG_RECONNECT_DELAY_MAX = "mq.reconnect.delay.max.ms";
185185
public static final String CONFIG_DOCUMENTATION_RECONNECT_DELAY_MAX = "The maximum delay in milliseconds for reconnect attempts.";
186-
public static final String CONFIG_DISPLAY_RECONNECT_DELAY_MAX = "reconnect maximum delay";
186+
public static final String CONFIG_DISPLAY_RECONNECT_DELAY_MAX = "Reconnect maximum delay";
187187
public static final long CONFIG_RECONNECT_DELAY_MAX_DEFAULT = 8192L;
188188
public static final long CONFIG_RECONNECT_DELAY_MAX_MINIMUM = 10L;
189189

@@ -587,7 +587,7 @@ null, new ReadableFile(),
587587
ConfigDef.Range.atLeast(CONFIG_MAX_RECEIVE_TIMEOUT_MINIMUM),
588588
ConfigDef.Importance.MEDIUM,
589589
CONFIG_DOCUMENTATION_MAX_RECEIVE_TIMEOUT,
590-
"MQ",
590+
CONFIG_GROUP_MQ,
591591
26,
592592
ConfigDef.Width.MEDIUM,
593593
CONFIG_DISPLAY_MAX_RECEIVE_TIMEOUT);
@@ -596,7 +596,7 @@ null, new ReadableFile(),
596596
CONFIG_SUBSEQUENT_RECEIVE_TIMEOUT_DEFAULT,
597597
ConfigDef.Importance.LOW,
598598
CONFIG_DOCUMENTATION_SUBSEQUENT_RECEIVE_TIMEOUT,
599-
"MQ",
599+
CONFIG_GROUP_MQ,
600600
27,
601601
ConfigDef.Width.MEDIUM,
602602
CONFIG_DISPLAY_SUBSEQUENT_RECEIVE_TIMEOUT);

0 commit comments

Comments
 (0)