You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/05/30 04:50:01 UTC

[GitHub] [james-project] chibenwa commented on a diff in pull request #1031: JAMES-3772 Close ReactorRabbitMQChannelPool synchronously

chibenwa commented on code in PR #1031:
URL: https://github.com/apache/james-project/pull/1031#discussion_r884416746


##########
backends-common/rabbitmq/src/main/java/org/apache/james/backends/rabbitmq/ReactorRabbitMQChannelPool.java:
##########
@@ -796,10 +799,9 @@ public Mono<Void> createWorkQueue(QueueSpecification queueSpecification) {
     @Override
     public void close() {
         sender.close();
-        ImmutableList.copyOf(refs.values())
-            .stream()
-            .map(PooledRef::poolable)
-            .forEach(channel -> getChannelCloseHandler().accept(SignalType.ON_NEXT, channel));
+       Flux.fromIterable(refs.values())
+           .flatMap(PooledRef::invalidate)
+           .blockLast();

Review Comment:
   No here we want to be sure that it is finished.
   
   Also stopping the app is not a reactive pipeline: blocking is OK.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org