camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Karlsen <davidkarl...@gmail.com>
Subject Re: Idempotent inconsistencies
Date Fri, 23 May 2014 07:49:58 GMT
Done: https://issues.apache.org/jira/browse/CAMEL-7461



2014-05-23 8:48 GMT+02:00 Claus Ibsen <claus.ibsen@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 <davidkarlsen@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: cibsen@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

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