liferoad commented on code in PR #32500:
URL: https://github.com/apache/beam/pull/32500#discussion_r1765563910
##########
sdks/java/io/mqtt/src/main/java/org/apache/beam/sdk/io/mqtt/MqttIO.java:
##########
@@ -590,4 +590,20 @@ public void closeMqttClient() throws Exception {
}
}
}
+
+ /** Create a connected MQTT BlockingConnection from given client, aware of
connection timeout. */
+ static BlockingConnection createConnection(MQTT client) throws Exception {
+ FutureConnection futureConnection = client.futureConnection();
+ org.fusesource.mqtt.client.Future<Void> connecting =
futureConnection.connect();
+ while (true) {
+ try {
+ connecting.await(1, TimeUnit.MINUTES);
+ } catch (TimeoutException e) {
+ LOG.warn("Connection to MQTT broker pending after waiting for 1
minute");
Review Comment:
possible to log the connection configurations?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]