protected void process ( String tenantId , List < S > items , int retryCount ) throws Exception { ProcessingUnit < S , T > pu = new ProcessingUnit < S , T > ( ) ; pu . setProcessor ( getProcessor ( ) ) ; pu . setRetrySubscriber ( retrySubscriber ) ; pu . setRetryCount ( retryCount ) ; pu . setResultHandler ( ( tid , events ) -> getPublisher ( ) . publish ( tid , events , getPublisher ( ) . getInitialRetryCount ( ) , getProcessor ( ) . getDeliveryDelay ( events ) ) ) ; pu . setRetryHandler ( ( tid , events ) -> getRetryPublisher ( ) . retry ( tid , events , pu . getRetrySubscriber ( ) , pu . getRetryCount ( ) - 1 , getProcessor ( ) . getRetryDelay ( events , pu . getRetryCount ( ) - 1 ) ) ) ; pu . handle ( tenantId , items ) ; }
This method processes the received list of items .