reactiverse / consul-cluster-manager Goto Github PK
View Code? Open in Web Editor NEWConsul - based cluster manager that can be plugged into Vert.x ecosystem.
License: Apache License 2.0
Consul - based cluster manager that can be plugged into Vert.x ecosystem.
License: Apache License 2.0
Create ConsulCacheableAsyncMultiMap
that would encapsulate caching of event-bus subscribers.
Evaluate if i's worth it first.
"nodeHost" is misleading - use "consulAgentLocation" to refer to the IP location of consul agent.
This has to be taken into account : https://github.com/vert-x3/wiki/wiki/3.8.0-Deprecations-and-breaking-changes#future-creation-and-completion.
THIS MUST BE ADDRESSED ASAP!!!
For details see #17 .
Option to provide custom service name would make more meaningful admin page of consul web ui.
We have multiple services, but when i open web ui, it is not possible to understand service's purpose without inspecting logs. Is there any limitations why variable SERVICE_NAME is constant?
i have strange error with clustered event bus handler (using reactiverse/consul-cluster-manager and vertx 3.9.5)
io.vertx.core.eventbus.ReplyException: No handlers for address NotifierService
at io.vertx.core.eventbus.impl.EventBusImpl.deliverMessageLocally(EventBusImpl.java:411)
at io.vertx.core.eventbus.impl.EventBusImpl.deliverMessageLocally(EventBusImpl.java:360)
at io.vertx.core.eventbus.impl.clustered.ClusteredEventBus.sendToSubs(ClusteredEventBus.java:347)
at io.vertx.core.eventbus.impl.clustered.ClusteredEventBus.onSubsReceived(ClusteredEventBus.java:235)
at io.vertx.core.eventbus.impl.clustered.ClusteredEventBus.lambda$sendOrPub$8(ClusteredEventBus.java:227)
at io.vertx.core.impl.FutureImpl.dispatch(FutureImpl.java:105)
at io.vertx.core.impl.FutureImpl.tryComplete(FutureImpl.java:150)
at io.vertx.core.impl.FutureImpl.complete(FutureImpl.java:111)
at io.vertx.core.impl.FutureImpl.handle(FutureImpl.java:176)
at io.vertx.core.impl.FutureImpl.handle(FutureImpl.java:21)
at io.vertx.core.impl.SucceededFuture.onComplete(SucceededFuture.java:41)
at io.vertx.core.Future.lambda$compose$3(Future.java:373)
at io.vertx.core.impl.FutureImpl.dispatch(FutureImpl.java:105)
at io.vertx.core.impl.FutureImpl.tryComplete(FutureImpl.java:150)
at io.vertx.core.impl.FutureImpl.complete(FutureImpl.java:111)
at io.vertx.core.impl.FutureImpl.handle(FutureImpl.java:176)
at io.vertx.core.impl.FutureImpl.handle(FutureImpl.java:21)
at io.vertx.core.impl.FutureImpl.dispatch(FutureImpl.java:105)
at io.vertx.core.impl.FutureImpl.tryComplete(FutureImpl.java:150)
at io.vertx.core.impl.FutureImpl.complete(FutureImpl.java:111)
at io.vertx.spi.cluster.consul.impl.ConsulAsyncMultiMap.lambda$doGet$16(ConsulAsyncMultiMap.java:201)
at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:327)
at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:834) [?:?]
where should i dig to find cause?
asked for help in https://gitter.im/eclipse-vertx/vertx-users - no response :|
may be app sometimes leaves cluster and that causes exception, how can i prove/fix that?
is it somehow network related? consul and apps on same machine
Consul 1.6.2 is running in docker on localhost at port 8500, using all the defaults. I bootstrap per the docs;
ConsulClusterManager consulClusterManager = new ConsulClusterManager();
options.setClusterManager(consulClusterManager);
The cluster manager dies with a NPE;
[ERROR] i.v.c.i.ContextImpl - Unhandled exception
java.lang.NullPointerException: null
at io.vertx.spi.cluster.consul.ConsulClusterManager.entryUpdated(ConsulClusterManager.java:478)
at io.vertx.spi.cluster.consul.impl.ConsulMapListener.lambda$kvWatchHandler$0(ConsulMapListener.java:89)
at io.vertx.ext.consul.impl.WatchImpl.sendSuccess(WatchImpl.java:213)
at io.vertx.ext.consul.impl.WatchImpl.lambda$go$3(WatchImpl.java:183)
at io.vertx.ext.consul.impl.WatchImpl.lambda$fetch$5(WatchImpl.java:198)
at io.vertx.ext.consul.impl.WatchImpl$KeyPrefix.lambda$wait$1(WatchImpl.java:62)
at io.vertx.ext.consul.impl.ConsulClientImpl.lambda$reqOnContext$61(ConsulClientImpl.java:731)
at io.vertx.ext.web.client.impl.HttpContext.handleDispatchResponse(HttpContext.java:308)
at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:295)
at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:270)
at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:69)
at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:32)
at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:267)
at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:277)
at io.vertx.ext.web.client.impl.HttpContext.dispatchResponse(HttpContext.java:238)
at io.vertx.ext.web.client.impl.HttpContext.lambda$null$2(HttpContext.java:367)
at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:369)
at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518)
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Entries of async map should also be cacheable. Take into account CAP switch.
I have three node( instance):
172.25.130.241: 4600, 172.25.130.241: 4601, 172.25.130.241: 4602
and register:
eb.consumer("abc-addr", ...)
each node fire event:
eb.request("abc-addr", data, ...)
but, it always the newest one process the message. (ie, 172.25.130.241: 4602)
i thank the "ChoosableIterable" implement class "ChoosableSet" or "ConsulAsyncMultiMap"
should keep previous pointer or instance for Load-Balance chooser
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.