Change in NOAA Behavior


Warren Fernandes
 

Hello cf-dev/cf-eng,

Loggregator would like to notify the community of a change in behavior for
noaa <https://github.com/cloudfoundry/noaa>, the client library for
Loggregator.

noaa <https://github.com/cloudfoundry/noaa>'s reconnecting methods
(Firehose, Stream, TailingLogs) will reconnect indefinitely using a
back-off strategy. See SetMinRetryDelay
<https://godoc.org/github.com/cloudfoundry/noaa/consumer#Consumer.SetMinRetryDelay>
and SetMaxRetryDelay
<https://godoc.org/github.com/cloudfoundry/noaa/consumer#Consumer.SetMaxRetryDelay>
to configure the back-off strategy.

Those who would like noaa <https://github.com/cloudfoundry/noaa> to stop
connecting after a certain number of tries can implement the behavior
similar to below:

```
msgs, errs := consumer.Firehose(subID, token)
go func() {
var count int32
consumer. SetOnConnectCallback(func() {
atomic.StoreInt32(&count, 0)
}
for range errs {
retries := atomic.AddInt32(&count, 1)
if retries >= 5 {
consumer.Close()
}
}
}()
```

If there are any questions or concerns regarding this change please feel
free to reach out to us via the Cloud Foundry Slack channel #loggregator
<https://cloudfoundry.slack.com/messages/loggregator/>.

Thanks.
CF Loggregator

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.