vertx-eventbus-bridge-clients
vertx-eventbus-bridge-clients copied to clipboard
Replying to messages sent from the Event Bus for Python bridge
It would be nice replying to messages sent from the Event Bus just like it's possible in the native Vert.x's EventBus.
Java Example:
vertx.eventBus().consumer("some.address", message -> message.reply("Hi publisher!"));
vertx.setPeriodic(1000, id -> {
vertx.eventBus().send("some.address", "Hi consumer!", ar -> {
if (ar.succeeded()) {
System.out.println(ar.result().body());
} else {
System.err.println(ar.cause().getMessage());
}
}
});
How can I achieve the same result from a TCP Event Bus Bridge Client (e.g. Python)?
Thanks in advance for your attention!
The java-client branch already seems to have a similar mechanism:
https://github.com/vert-x3/vertx-eventbus-bridge-clients/blob/java-client/java/src/main/java/io/vertx/ext/eventbus/client/Message.java#L40-L66
Yeah, but I need that mechanism in Python...
note: java's interface was modelled after the Vert.x core EventBus interface and aims to provide the same signature, ultimately it should be possible to use Java Service Proxy with the event bus bridge Java client
@mvandi can you contribute something ?