I am using DynamoDB with Vertx and one of my verticles is getting timed out with error
Timed out after waiting 30000(ms) for a reply. address
eventBus.send("test", testObject, x -> {
if (x.succeeded()) {
log.info("done successfully")
} else {
error(“error while completing”)
}
}
);
public CompletableFuture<Void> process(Object testObject) {
return CompletableFuture.runAsync(() -> dynamoMapper.save(testObject))
.thenAcceptAsync(result -> {
log.info("done successfully")
}).exceptionally(throwable -> {
throw new CompletionException(throwable);
});
}
final void listen(String address) {
eventBus.consumer("test", x -> process(x).whenCompleteAsync((result, t) -> {
if (t == null) {
x.reply(OK);
} else {
x.fail(0, errorMessage);
}
}));
}
But when I run that DynamoDB save query in async I am not having this issue. Can somebody suggest best practices to use DynamoDB with vert.x?