flu-rails 8.0.9 → 8.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbc282f411276d4ad52ca02b624367edafd40b6396eafe57f6c4250c9c18da29
4
- data.tar.gz: 28fcf8776ec3aa50318bfbed9d7779482be0f76cd3e51222c965c7ace9acb316
3
+ metadata.gz: 9245f314def815225067e1198b65862370df7b9c5a23ed9aaa4650325123a2d1
4
+ data.tar.gz: 11ec07a03357de79a783674d6782d1034b3c879d32a4f7f2321a07d9b2b88420
5
5
  SHA512:
6
- metadata.gz: 6085eec4b84cb2a42eee67eebc5eb6752c21a8f1c889d59cb3ce215fa2e91efd7f13b31d816662fb96b3dc8ab30b79b20bf6cb44049ff964277793d2a71ea571
7
- data.tar.gz: f6ef03cd47e961a3234e21e5d51bce950da55326e5df21d305c8080be3e31eb7356339b546b68daec73c05ef83ea72752526860d553cbe4ece04474e57c0c4a7
6
+ metadata.gz: '08c9fa68a5162a63d1b2c3949f21675a64d59a513661e98672d1b4f35211e9b5295ef6086c13168bb18ddbe13e4e21b822800e303ad6672af9f0aa4b1c2e57d9'
7
+ data.tar.gz: 1707f100cf25d4d77d7462e11c6d9484cb6e5f0089f06d56e42b9a54a5b24f90e3cf2e75061090dc4ef5e5203c96eb51fb8993846bcd4a4d9e859e6f78e3c0bb
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ### [8.0.10] - 2026-09-15
9
+
10
+ **Fixed**
11
+
12
+ * Keep a pending publication waiting while Bunny reopens the channels, rather than spend its attempts. Since 8.0.9, publishing while Bunny reopens the channels raises `Flu::ConnectionLostError`, and the event is kept for another attempt. But the publisher still said it was `connected?` in that window -- the connection is `open?` from its handshake on -- so every drain of the pending publications retried the event at once and charged it an attempt: one right after the failing commit, another at the next commit on the thread or at the end of the job. An event failing there had one attempt left out of three, and a thread committing twice within the few milliseconds Bunny takes to reopen the channels lost it for a transaction that had committed. `connected?` is now false while Bunny reopens the channels, as it is while the connection is down, and a pending publication waits for Bunny to be done.
13
+
8
14
  ### [8.0.9] - 2026-09-14
9
15
 
10
16
  * Enforce gem `json < 3`
data/README.md CHANGED
@@ -16,7 +16,7 @@ For now, events are generated from:
16
16
  Add the gem to your project's Gemfile:
17
17
 
18
18
  ```ruby
19
- gem "flu-rails", "8.0.9"
19
+ gem "flu-rails", "8.0.10"
20
20
  ```
21
21
 
22
22
  Then, create an initializer into your Rails app (`config/initializers/flu-rails.rb`)
@@ -320,8 +320,8 @@ scoped RubyGems credential.
320
320
  3. Tag the commit and push the tag:
321
321
 
322
322
  ```
323
- $ git tag -a v8.0.9 -m "Version 8.0.9"
324
- $ git push origin v8.0.9
323
+ $ git tag -a v8.0.10 -m "Version 8.0.10"
324
+ $ git push origin v8.0.10
325
325
  ```
326
326
 
327
327
  The workflow then checks that the tag matches `Flu::VERSION`, runs the tests, builds the gem
@@ -53,8 +53,15 @@ module Flu
53
53
  end
54
54
  end
55
55
 
56
+ # Not connected while Bunny is reopening the channels either, although the connection is 'open?'
57
+ # from its handshake on: 'exchange' refuses to publish in that window, and 'PendingPublications'
58
+ # asks here before it retries. A publisher that said it was connected and then refused cost the
59
+ # event one of its attempts on every drain -- the one right after the failing commit, then the
60
+ # next commit or the end of the job -- and a thread committing twice within the few milliseconds
61
+ # Bunny takes to reopen the channels lost the event for a committed transaction. Saying it is not
62
+ # connected makes the event wait for Bunny to be done, as it does while the connection is down.
56
63
  def connected?
57
- !forked? && !@connection.nil? && @connection.open?
64
+ !forked? && !@connection.nil? && @connection.open? && !being_reopened?
58
65
  end
59
66
 
60
67
  # Closing the connection closes every channel opened on it, and stops the heartbeat and
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Flu
4
- VERSION = "8.0.9"
4
+ VERSION = "8.0.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flu-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.9
4
+ version: 8.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loïc Vigneron