The Java microservice lib. QBit is a reactive programming lib for building microservices - JSON, HTTP, WebSocket, and REST. QBit uses reactive programming to build elastic REST, and WebSockets based cloud friendly, web services. SOA evolved for mobile and cloud. ServiceDiscovery, Health, reactive StatService, events, Java idiomatic reactive programming for Microservices.
Going through the totdo-Statd tutorial the 'TodoServiceMain' class spat out the not found error, it appears to centre around this statement :
final ServiceManagementBundle serviceManagementBundle =
serviceManagementBundleBuilder().setServiceName("TodoServiceImpl")
.setManagedServiceBuilder(managedServiceBuilder).build();
Admittedly Java is not my first language so not certain if I failed to do something.
Also, I had to replace some code in the 'TodoServiceImpl' class in order to get it to compile, see below for an example, was this the right thing to do?
@Override
@POST(value = "/todo")
public Promise<Boolean> addTodo(final Todo todo) {
return invokablePromise(promise -> {
/** Send KPI addTodo called every time the addTodo method gets called. */
mgmt.increment("addTodo.called");
todoMap.put(todo.getId(), todo);
//promise.accept(true); // **This line was removed**
promise.resolve(true); // **and replaced by this one**
});
}
Going through the totdo-Statd tutorial the 'TodoServiceMain' class spat out the not found error, it appears to centre around this statement :
final ServiceManagementBundle serviceManagementBundle = serviceManagementBundleBuilder().setServiceName("TodoServiceImpl") .setManagedServiceBuilder(managedServiceBuilder).build();
Admittedly Java is not my first language so not certain if I failed to do something.
Also, I had to replace some code in the 'TodoServiceImpl' class in order to get it to compile, see below for an example, was this the right thing to do?
Any help would be most appreciated.
Mark