Done: https://issues.apache.org/jira/browse/CAMEL-7461
2014-05-23 8:48 GMT+02:00 Claus Ibsen <claus.ib...@gmail.com>: > Hi > > I think its historical reasons with using strings first in Camel. > > You are welcome to log a ticket to get this improved in a future release > > On Thu, May 22, 2014 at 9:12 PM, David Karlsen <davidkarl...@gmail.com> > wrote: > > 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 > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cib...@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > hawtio: http://hawt.io/ > fabric8: http://fabric8.io/ > -- -- David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen