public async Task ProcessInternal()
        {
            var now = DateTime.UtcNow;

            var pendingMessages = await eventStorage.GetEventsOfNeedRetry();

            if (logger.IsEnabled(LogLevel.Debug))
            {
                logger.LogDebug($"{nameof(PendingMessageRetryProcessor)}  pendingMessages count:{pendingMessages.Count()}");
            }
            foreach (var pendingMessage in pendingMessages)
            {
                var eventContentBytes = Encoding.UTF8.GetBytes(pendingMessage.Content);
                var bytesTransport    = new EventBytesTransport(pendingMessage.Name, pendingMessage.Id, eventContentBytes);
                var bytes             = bytesTransport.GetBytes();
                if (pendingMessage.Retries > options.MaxFailedRetryCount)
                {
                    pendingMessage.StatusName = nameof(EventStatus.Failed);
                    continue;
                }
                pendingMessage.Retries++;
                var targetName = producerContainer.GetTargetName(pendingMessage.Name);
                await producer.Publish(targetName, bytes);

                pendingMessage.StatusName = nameof(EventStatus.Published);
                pendingMessage.ExpiresAt  = DateTime.UtcNow.AddSeconds(options.PublishedEventsExpiredAfterSeconds);
            }
            if (pendingMessages.Count() > 0)
            {
                if (pendingMessages.Count() > 10)
                {
                    await eventStorage.BulkChangePublishStateAsync(pendingMessages);
                }
                else
                {
                    await eventStorage.ChangePublishStateAsync(pendingMessages);
                }
            }
        }