InigoSJ commented on issue #27094:
URL: https://github.com/apache/beam/issues/27094#issuecomment-1585208501

   Just as side note, I have never used this IO besides this Git Issue, so I am 
definitely not an authority here.
   
   I think the idea I mention above should work, check if the connection is 
alive in `StartBundle()` and if it's not recreate. I would do something like 
this:
   
   ```
   ElasticIO {
   Connection connection
   
   @SetUp() {
   connection = CreateConnection()
   }
   
   @StartBundle() {
   if (!connection.IsAlive()) {
       connection = CreateConnection
   }
   }
   
   @ProcessElement {
   ....
   }
   
   CreateConnection {
        Same code as now
   }
   
   }
   ```
   
   Again, I don't know the intricacies of the IO, so this may not be possible, 
but any other idea I can come up with seems to have more downsides that the 
current approach
   
   
   
   


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