Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.20.1
-
None
-
Unknown
Description
Documentation 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
this.index = new AtomicReference(BigInteger.valueOf(configuration.getFirstIndex()));
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:
@UriParam( label = "consumer,watch", defaultValue = "0" ) private long firstIndex;
Seems that it should be changed to be of BigInteger type.
Attachments
Issue Links
- is related to
-
CAMEL-12410 No type converter from java.lang.String to java.math.BigInteger required for firstIndex
- Resolved