camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Karlsen <davidkarl...@gmail.com>
Subject Idempotent inconsistencies
Date Thu, 22 May 2014 19:12:00 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message