Skip to content

Releases: ITV/bucky

Release list

v4.0.3

Choose a tag to compare

@appliedfunctor appliedfunctor released this 07 Jul 09:38

What's Changed

This release switches docs to mdoc and fixes a reconnection bug in the fs2-rabbit backend.

Root Cause

The bug was in Fs2RabbitAmqpClient.registerConsumer in the v4 fs2-rabbit backend.

The old code ran the consumer stream in .background and silently discarded the outcome:

consumer.compile.drain
  .background
  .flatMap { _ =>   // ← outcome ignored — errors swallowed
    Resource.onFinalize(...)
  }

When a network blip caused the AMQP channel to close, the fs2-rabbit stream terminated with an error. That error was never observed, and no restart was attempted.

v3 didn't have this problem because it used DefaultConsumer on a Java AutorecoveringChannel, which the AMQP Java client automatically re-registers after recovery — no application-level retry needed. v4 switched to an fs2 stream-based consumer which has no such built-in recovery.

A secondary bug: handler exceptions propagated via Async[F].fromEither(res) and also killed the stream instead of using exceptionalAction.

Fix

Connection recovery — wrapped the consumer loop in a recursive handleErrorWith retry (consumerWithRecovery) that sleeps for config.networkRecoveryInterval then creates a fresh channel and consumer on each attempt. A fresh channel is critical because the auto-recovered channel's dead internal fs2-rabbit queue would otherwise accumulate un-acked messages.

Handler exceptions — now caught and resolved via exceptionalAction (logged + the action applied) rather than crashing the stream.

config: AmqpClientConfig added to the class so the recovery delay tracks networkRecoveryInterval.

New Contributors

Full Changelog: v4.0.2...v4.0.3

v4.0.2

Choose a tag to compare

@alexcardell alexcardell released this 31 Mar 16:34

What's Changed

Full Changelog: v3.1.5...v4.0.2