File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
src/main/java/com/ibm/eventstreams/connect/mqsource Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ public class MQSourceTask extends SourceTask {
37
37
private CountDownLatch batchCompleteSignal = null ; // Used to signal completion of a batch
38
38
private AtomicInteger pollCycle = new AtomicInteger (1 ); // Incremented each time poll() is called
39
39
private int lastCommitPollCycle = 0 ; // The value of pollCycle the last time commit() was called
40
- private AtomicBoolean receivingMessages = new AtomicBoolean (); // Whether currently receiving messages
41
40
private AtomicBoolean stopNow = new AtomicBoolean (); // Whether stop has been requested
42
41
43
42
private JMSReader reader ;
@@ -114,8 +113,6 @@ public MQSourceTask() {
114
113
log .debug ("Starting poll cycle {}" , currentPollCycle );
115
114
116
115
try {
117
- receivingMessages .set (true );
118
-
119
116
if (!stopNow .get ()) {
120
117
log .info ("Polling for records" );
121
118
SourceRecord src ;
@@ -133,7 +130,6 @@ public MQSourceTask() {
133
130
}
134
131
}
135
132
finally {
136
- receivingMessages .set (false );
137
133
}
138
134
139
135
synchronized (this ) {
@@ -219,16 +215,7 @@ public void commit() throws InterruptedException {
219
215
220
216
stopNow .set (true );
221
217
222
- boolean willClose = false ;
223
-
224
218
synchronized (this ) {
225
- if (receivingMessages .get ()) {
226
- log .debug ("Will close connection" );
227
- willClose = true ;
228
- }
229
- }
230
-
231
- if (willClose ) {
232
219
// Close the connection to MQ to clean up
233
220
if (reader != null ) {
234
221
reader .close ();
You can’t perform that action at this time.
0 commit comments