Skip to content

v0.7.0

Pre-release
Pre-release

Choose a tag to compare

@tmaxmax tmaxmax released this 19 Nov 17:00
· 45 commits to master since this release
v0.7.0
049b953

This version overhauls connection retry and fixes the connection event dispatch order issue. Some internal changes to Joe were also made, which makes it faster and more resilient.

Removed

  • ConnectionError.Temporary
  • ConnectionError.Timeout

Changed

  • Go's Timeout and Temporary interfaces are not used anymore – the client makes no assumptions and retries on every network or response read error. The only cases when Connection.Connect returns now are either when there are no more retries left (when the number is not infinite), or when the request context was cancelled.
  • *url.Errors that occur on the HTTP request are now unwrapped and their cause is put inside a ConnectionError.
  • Connection.Connect doesn't suppress any errors anymore: the request context errors are returned as is, all other errors are wrapped inside ConnectionError.
  • On reconnection attempt, the response reset error is now wrapped inside ConnectionError. With this change, all errors other than the context errors are wrapped inside ConnectionError.
  • Subscription callbacks are no longer called in individual goroutines. This caused messages to be received in an indereminate order. Make sure that your callbacks do not block for too long!
  • If a ReplayProvider method panics when called by Joe, instead of closing itself completely it just stops replaying, putting or GC-ing messages to upcoming clients. Joe continues to function as if no replay provider was given. A stack trace is printed to stderr when such a panic occurs.