harissecic opened a new issue #8904:
URL: https://github.com/apache/pulsar/issues/8904


   **Is your feature request related to a problem? Please describe.**
   Azure App Services time out after being idle for 240 seconds (4 minutes) and 
there's no actual way to avoid this. All connections at least in my experience 
get killed but not 100% sure about properly closed.
   
   **Describe the solution you'd like**
   Using clients (Java client in my case) inside such environment makes me 
restart manually services if there was no messages for given consumer in 4 
minute time window. Would be good to have option reconnect after on building a 
consumer or maybe even PulsarClient in this case.
   
   **Describe alternatives you've considered**
   Could avoid using App Services. Could implement wrapping solution which 
"kills" the pulsar consumer if no messages have been sent in 4 minutes. This 
would have to be notified by the actual message listener or so on each message 
and have it's own internal timer. Reflection is really a poor choice even worse 
then previous example but could work.
   
   **Additional context**
   As usual in business sometimes we are forced to use technologies and 
providers that don't play well together. Pulsar is picked by choice and Azure 
was forced upon us by a client. So trying to report as much as possible of 
these niche scenarios. Neo4j client libraries had similar issues where they had 
to introduce the timeout for idle connections as TCP was incorrectly closed by 
Azure on App Service and Neo4j client though connection stayed opened so it 
didn't mark connection as killed or so but rather always threw exception after 
specific timeout for data exchange so just a heads up not to rely on TCP close 
handshakes.
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to