camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Cosentino (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-12065) [Camel-consul] firstIndex cannot be set if it is out of Long range
Date Thu, 07 Dec 2017 09:51:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-12065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16281576#comment-16281576
] 

Andrea Cosentino commented on CAMEL-12065:
------------------------------------------

Thanks, since this is a breaking change for the configuration of Camel-consul this is fixed
only on 2.21.0

> [Camel-consul] firstIndex cannot be set if it is out of Long range
> ------------------------------------------------------------------
>
>                 Key: CAMEL-12065
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12065
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-consul
>    Affects Versions: 2.20.1
>            Reporter: Viachaslau Tsikhanovich
>            Assignee: Andrea Cosentino
>             Fix For: 2.21.0
>
>
> [Documentation|http://camel.apache.org/consul-component.html] claims that _firstIndex_
option must be of Long Java type.
> However WaitIndex (that is generated by Consul and should be set for _firstIndex_ to
skip all events until one that has such WaitIndex) is actually of BigInteger type and can
be out of Long type range - https://github.com/hashicorp/consul/blob/master/api/event.go#L90-L104
> _org.apache.camel.component.consul.enpoint.ConsulEventConsumer_ has _index_ field of
correct type AtomicReference<BigInteger> and is initialized as
> {code}
> this.index = new AtomicReference(BigInteger.valueOf(configuration.getFirstIndex()));
> {code}
> However BigInteger value that is out of Long range cannot be passed for _index_  from
apiEnpoint option _firstIndex_ because _org.apache.camel.component.consul.ConsulConfiguration_
has _firstIndex_ field that is declared as _long_ type:
> {code}
>     @UriParam(
>         label = "consumer,watch",
>         defaultValue = "0"
>     )
>     private long firstIndex;
> {code}
> Seems that it should be changed to be of BigInteger type.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message