@@ -37,12 +37,10 @@ class AmqpEnvironment implements Environment {
37
37
private final AtomicBoolean closed = new AtomicBoolean (false );
38
38
private final boolean internalExecutor ;
39
39
private final boolean internalScheduledExecutor ;
40
- private final boolean internalConsumerExecutor ;
41
40
private final boolean internalPublisherExecutor ;
42
41
private final ExecutorService executorService ;
43
42
private final ScheduledExecutorService scheduledExecutorService ;
44
43
private final ExecutorService publisherExecutorService ;
45
- private final ExecutorService consumerExecutorService ;
46
44
private final ConnectionManager connectionManager = new ConnectionManager (this );
47
45
private final long id ;
48
46
private final Clock clock = new Clock ();
@@ -58,7 +56,6 @@ class AmqpEnvironment implements Environment {
58
56
ExecutorService executorService ,
59
57
ScheduledExecutorService scheduledExecutorService ,
60
58
ExecutorService publisherExecutorService ,
61
- ExecutorService consumerExecutorService ,
62
59
DefaultConnectionSettings <?> connectionSettings ,
63
60
MetricsCollector metricsCollector ,
64
61
ObservationCollector observationCollector ) {
@@ -91,14 +88,6 @@ class AmqpEnvironment implements Environment {
91
88
this .publisherExecutorService = publisherExecutorService ;
92
89
this .internalPublisherExecutor = false ;
93
90
}
94
- if (consumerExecutorService == null ) {
95
- this .consumerExecutorService =
96
- Executors .newCachedThreadPool (Utils .threadFactory (threadPrefix + "consumer-" ));
97
- this .internalConsumerExecutor = true ;
98
- } else {
99
- this .consumerExecutorService = consumerExecutorService ;
100
- this .internalConsumerExecutor = false ;
101
- }
102
91
this .metricsCollector =
103
92
metricsCollector == null ? NoOpMetricsCollector .INSTANCE : metricsCollector ;
104
93
this .observationCollector =
@@ -147,9 +136,6 @@ public void close() {
147
136
if (this .internalPublisherExecutor ) {
148
137
this .publisherExecutorService .shutdownNow ();
149
138
}
150
- if (this .internalConsumerExecutor ) {
151
- this .consumerExecutorService .shutdownNow ();
152
- }
153
139
if (this .clockRefreshFuture != null ) {
154
140
this .clockRefreshFuture .cancel (false );
155
141
}
@@ -170,10 +156,6 @@ ExecutorService publisherExecutorService() {
170
156
return this .publisherExecutorService ;
171
157
}
172
158
173
- ExecutorService consumerExecutorService () {
174
- return this .consumerExecutorService ;
175
- }
176
-
177
159
ScheduledExecutorService scheduledExecutorService () {
178
160
return this .scheduledExecutorService ;
179
161
}
0 commit comments