@@ -37,12 +37,10 @@ class AmqpEnvironment implements Environment {
3737 private final AtomicBoolean closed = new AtomicBoolean (false );
3838 private final boolean internalExecutor ;
3939 private final boolean internalScheduledExecutor ;
40- private final boolean internalConsumerExecutor ;
4140 private final boolean internalPublisherExecutor ;
4241 private final ExecutorService executorService ;
4342 private final ScheduledExecutorService scheduledExecutorService ;
4443 private final ExecutorService publisherExecutorService ;
45- private final ExecutorService consumerExecutorService ;
4644 private final ConnectionManager connectionManager = new ConnectionManager (this );
4745 private final long id ;
4846 private final Clock clock = new Clock ();
@@ -58,7 +56,6 @@ class AmqpEnvironment implements Environment {
5856 ExecutorService executorService ,
5957 ScheduledExecutorService scheduledExecutorService ,
6058 ExecutorService publisherExecutorService ,
61- ExecutorService consumerExecutorService ,
6259 DefaultConnectionSettings <?> connectionSettings ,
6360 MetricsCollector metricsCollector ,
6461 ObservationCollector observationCollector ) {
@@ -91,14 +88,6 @@ class AmqpEnvironment implements Environment {
9188 this .publisherExecutorService = publisherExecutorService ;
9289 this .internalPublisherExecutor = false ;
9390 }
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- }
10291 this .metricsCollector =
10392 metricsCollector == null ? NoOpMetricsCollector .INSTANCE : metricsCollector ;
10493 this .observationCollector =
@@ -147,9 +136,6 @@ public void close() {
147136 if (this .internalPublisherExecutor ) {
148137 this .publisherExecutorService .shutdownNow ();
149138 }
150- if (this .internalConsumerExecutor ) {
151- this .consumerExecutorService .shutdownNow ();
152- }
153139 if (this .clockRefreshFuture != null ) {
154140 this .clockRefreshFuture .cancel (false );
155141 }
@@ -170,10 +156,6 @@ ExecutorService publisherExecutorService() {
170156 return this .publisherExecutorService ;
171157 }
172158
173- ExecutorService consumerExecutorService () {
174- return this .consumerExecutorService ;
175- }
176-
177159 ScheduledExecutorService scheduledExecutorService () {
178160 return this .scheduledExecutorService ;
179161 }
0 commit comments