Amraneze commented on code in PR #25945:
URL: https://github.com/apache/beam/pull/25945#discussion_r1157566021


##########
sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsIO.java:
##########
@@ -1026,7 +1027,7 @@ public void start() throws JMSException {
         }

Review Comment:
   We added the flag in case of a failed connection it will create a new 
connection based on exceptionListener. Do you think it would be better to check 
with the producer if it's null ?
   
   ````java
   if (producer == null) {
   // open connection
   connection.setExceptionListener(exception -> {
       connectionCounter.inc();
       // if there is an issue with the connection, we will close session, 
connection & producer so it can be recreated it
       close();
   });
   // create new producer
   }
   ````



-- 
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]

Reply via email to