SimpleRetryPolicyTemplate simpleRetryPolicyTemplate = new SimpleRetryPolicyTemplate(
TimeUnit.SECONDS.toMillis(secondsBetweenRetries), maxRetries);
RetryPolicyTemplate retryPolicyTemplate = new AsynchronousRetryTemplate(simpleRetryPolicyTemplate);
retryPolicyTemplate.setNotifier(new RetryNotifier()
{
@Override
public void onSuccess(RetryContext context)
{
removeFromStore(eventStoreKey);