public void shutdown ( ) { shutDown = true ; try { while ( inflightReceiveMessageBatches > 0 ) Thread . sleep ( 100 ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } }
Prevents spawning of new retrieval batches and waits for all in - flight retrieval batches to finish