IdempotentConsumer demands that the messageId is a string: final String messageId = messageIdExpression.evaluate(exchange, String.class); if (messageId == null) { throw new NoMessageIdException(exchange, messageIdExpression); }
boolean newKey; if (eager) { // add the key to the repository newKey = idempotentRepository.add(messageId); } else { // check if we already have the key newKey = !idempotentRepository.contains(messageId); } (Why isn't it an object or a parameterized type?) but the IdempotentRepository interface is parameterized to hold any type <E> -- -- David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen