List of usage examples for io.vertx.pgclient PgConnection notificationHandler
@Fluent PgConnection notificationHandler(Handler<PgNotification> handler);
From source file:examples.PgClientExamples.java
License:Apache License
public void pubsub01(PgConnection connection) { connection.notificationHandler(notification -> { System.out//from w w w . j a va 2s . c om .println("Received " + notification.getPayload() + " on channel " + notification.getChannel()); }); connection.query("LISTEN some-channel", ar -> { System.out.println("Subscribed to channel"); }); }