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);
    }
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.

@param tenantId The optional tenant id
@param items The items
@param retryCount The remaining retry count
@throws Failed to process items