The sendCountRequest function in
_examples/real-world-examples/exactly-once-delivery-counter/run.go
contains a critical resource leak that can cause the example to fail under load.
Problem
-
HTTP response bodies are never closed
=> The current implementation calls http.Post in a tight loop but never closes resp.Body:
-
Infinite retry loop without backoff
=> If the server returns any status code other than 204 No Content (e.g., 400 or 500), the function retries immediately in a tight loop