You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "Amraneze (via GitHub)" <gi...@apache.org> on 2023/04/04 17:33:38 UTC

[GitHub] [beam] Amraneze commented on a diff in pull request #25945: [#25887] fix(JmsIO): issue with multiple connection open #25887

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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org