<pre class="sourcecode"><br>we are using rabbitmq rpc in java, and using jdk threadpool as following:<br><br><span style="font-family: courier new,monospace; background-color: rgb(153, 153, 153);">ExecutorService </span><b style="font-family: courier new,monospace; background-color: rgb(153, 153, 153);">es</b><span style="font-family: courier new,monospace; background-color: rgb(153, 153, 153);"> = Executors.newFixedThreadPool(20);
Connection conn = factory.newConnection(</span><b style="font-family: courier new,monospace; background-color: rgb(153, 153, 153);">es</b><span style="font-family: courier new,monospace; background-color: rgb(153, 153, 153);">);</span><br style="font-family: courier new,monospace; background-color: rgb(153, 153, 153);"><span style="font-family: courier new,monospace; background-color: rgb(153, 153, 153);">....</span><br><br>but, for shtutting down rpc server, how can we make sure all messages have been dealt with, and no msg lost.<br>we want a graceful shutdown process, seems no document talking about that.
<br>if we call:<br><span style="background-color: rgb(153, 153, 153); color: rgb(0, 0, 0);">execService.shutdown();</span><br style="background-color: rgb(153, 153, 153); color: rgb(0, 0, 0);"><span style="background-color: rgb(153, 153, 153); color: rgb(0, 0, 0);"><br><span style="background-color: rgb(255, 255, 255);">Consumer.handleDelivery will not be triggerred then?</span></span><br><br>Anyone can help will be very appreciated..<br></pre>