Skip to content

Release 2.0.0? #427

Closed
Closed

Description

@eglitobias

From my side everything on main is ready for 2.0.0, except one open question: JRuby.

JRuby path is broken in at least three ways: CI runs no JRuby job, so none of this shows up. All of the below measured on JRuby 10.1.1.0, march_hare 4.8.0, RabbitMQ 4.

1. No java platform gem since 0.25.0 (#368)

The if defined?(JRUBY_VERSION) branch in the gemspec only applies when the gem is built on JRuby. Every release since 0.26.0 is published as platform ruby with bunny as a runtime dependency, so gem install hutch on JRuby installs bunny and require "hutch" then fails on the missing march_hare.

2. Broker#open_channel raises (since 1.4.0, f664026)

The delivery acknowledgement timeout recovery hook is installed for every adapter, but MarchHare::Channel has no on_error callback:

NoMethodError: undefined method 'on_error' for an instance of Java::ComRabbitmqClientImpl::ChannelN
             method_missing at march_hare-4.8.0-java/lib/march_hare/channel.rb:1015
  install_channel_recovery! at lib/hutch/broker.rb:127
               open_channel at lib/hutch/broker.rb:118

The same script returns a MarchHare::Channel on v1.3.1. PR #426 moves the hook into the adapters: the bunny one installs it, the march_hare one does not.

3. The exchange is never declared on march_hare

Broker#declare_exchange calls Adapter.new_exchange, which is MarchHare::Exchange.new. That only builds the object; in march_hare it is Channel#exchange that declares, via Exchange.new(...).tap { |x| x.declare! }. After a hutch run on JRuby, rabbitmqctl list_exchanges lists no hutch exchange. This came in with afac4b9 (2021); before that the line was Bunny::Exchange.new, which did not work on JRuby either.

2.0.0 looks like the point to decide this one way or the other: either JRuby is supported, which means publishing a java gem again, declaring the exchange, and at least a smoke CI job on jruby-10 - or the JRuby claim comes out of the gemspec and the CHANGELOG.

Personally, I don't need JRuby, but I'd be very happy to see a version 2.0.0 so I can take advantage of the latest improvements.

Activity

  1. michaelklishin commented on Aug 20, 2026

    @michaelklishin
    Member

    @eglitobias I have pushed fixes for 2 and 3.

    As for 1, building on JRuby for publishing a JRuby version was necessary a few years ago. I don't remember the details but publishing for JRuby on MRI produced non-JRuby compatible gem metadata, something like that.

  2. michaelklishin commented on Aug 20, 2026

    @michaelklishin
    Member

    I'm all for shipping 2.0.0 soon (say, in the next couple of weeks).

    @eglitobias have I offered to make you a collaborator in this repo? Your contributions speak for themselves.

  3. eglitobias commented on Aug 20, 2026

    @eglitobias
    CollaboratorAuthor

    @michaelklishin
    Thanks for the quick fixes.

    #428 adds a JRuby smoke job, which would have caught both regressions. I'm going to take a closer look at it since I had to pin the minitest version for this. As soon as I'm happy with it, I'll merge it.

    On 1: I think the constraint sits in our gemspec, not in RubyGems. Platform and dependency both come from defined?(JRUBY_VERSION) at build time, so a build on MRI can only produce the ruby variant. march_hare.gemspec sets s.platform = 'java' unconditionally, and when I forced that branch in hutch.gemspec and built on MRI I got a proper hutch-2.0.0.pre-java.gem with the march_hare dependency. So the second artifact has to be built and pushed either way, but it does not have to come from JRuby.

    On collaborator rights: I already have them here, so there is nothing you need to do. I am happy to keep helping either way. RabbitMQ is a big part of our application, and I would like to be useful across the stack, bunny and amq-protocol included. The part I like about the current setup is that someone else looks at my changes before they land, and you're super fast about it. Thank you!
    If you want to hand over more, I would take it as a lot of trust, but please do not feel you have to.

  4. michaelklishin commented on Aug 20, 2026

    @michaelklishin
    Member

    @eglitobias awesome! I understand exactly what fails in those jobs, having solved this in several other client test suites, including Bunny earlier today.

    I will take care of those but I'd appreciate if you could research what'd be the optimal, pragmatic way to produce two versions (MRI, JRuby) of the gem.

  5. eglitobias commented on Aug 20, 2026

    @eglitobias
    CollaboratorAuthor

    @michaelklishin I removed the 4.3 part in the JRuby PR. And opened RabbitMQ 4.3- #429 draft PR (as there are some issues with the latest version).

  6. michaelklishin commented on Aug 20, 2026

    @michaelklishin
    Member

    Well, I was about to push some test fixes for RabbitMQ 4.3. I will rebase.

  7. eglitobias commented on Aug 20, 2026

    @eglitobias
    CollaboratorAuthor

    Great, I haven't really worked on 4.3 yet. I just noticed that the pipeline is throwing errors. Thanks for looking into it. (I closed my 4.3 draft)

  8. eglitobias commented on Aug 20, 2026

    @eglitobias
    CollaboratorAuthor

    One thing on 4.3 is not a test fix: on a quorum queue with x-consumer-timeout, 4.3 returns the message to the queue and cancels the consumer instead of closing the channel with 406. The recovery I added in #414 never fires and nothing re-subscribes.

    Measured against 4.3.5: the queue ends up with 1 message and 0 unacknowledged, and the client logs No consumer for tag ... on channel 1!. Happy to take a look at on_cancellation if you want it handled.

  9. michaelklishin commented on Aug 20, 2026

    @michaelklishin
    Member

    @eglitobias I have that covered in #428, which I have renamed to reflect its much broader new scope.

  10. michaelklishin commented on Aug 20, 2026

    @michaelklishin
    Member

    #428 is in.

  11. eglitobias commented on Aug 20, 2026

    @eglitobias
    CollaboratorAuthor

    Thank you! @michaelklishin
    From my side, everything looks ready for 2.0.0 now.

  12. michaelklishin commented on Aug 20, 2026

    @michaelklishin
    Member

    @eglitobias can you please try Hutch in main in your dev environments to confirm?

  13. eglitobias commented on Aug 20, 2026

    @eglitobias
    CollaboratorAuthor

    @michaelklishin Sure. I'll let you know as soon as I've done the test.

  14. eglitobias commented on Aug 20, 2026

    @eglitobias
    CollaboratorAuthor

    @michaelklishin
    Confirmed, hutch main works in our dev environment: Ruby 4 against Rabbit 4.2.

    Separately, I opened #430: it publishes the gem from CI via trusted publishing, so pushing a tag does the release, and it also restores the java variant that has been missing since 0.25.0. It needs a trusted publisher registered for the gem first, which only an owner can do, so I could not test the push itself. Happy to drop it if you would rather keep releasing by hand.

  15. michaelklishin commented on Aug 21, 2026

    @michaelklishin
    Member

    The only thing left before the 2.0.0 release is going over the change log. It can be missing some things, or cover something not necessarily worth mentioning.

  16. eglitobias commented on Aug 21, 2026

    @eglitobias
    CollaboratorAuthor

    I've cleaned up the Changelog a bit #431.

    It would be a great honor for me to set the tag and release this gem (RubyGems profile). I've been working with Ruby for a very long time, but I've never gotten around to releasing a public gem. However, I fully understand if you want to retain those rights for yourself.

  17. michaelklishin commented on Aug 21, 2026

    @michaelklishin
    Member

    @eglitobias oh, absolutely. I'd need to add you as a collaborator on rubygems.org, for which I need your username (could be email, which I wouldn't want to ask for here).

    You can find me on the RabbitMQ community Discord server and DM. Both personal and the Broadcom account are in the general room.

  18. eglitobias commented on Aug 22, 2026

    @eglitobias
    CollaboratorAuthor

    @michaelklishin I'm glad to hear that. I sent you a friend request on Discord. This is my public profile on RubyGems https://rubygems.org/profiles/tobiasegli

  19. michaelklishin commented on Aug 22, 2026

    @michaelklishin
    Member

    @eglitobias done, you will need to confirm a co-owner role on rubygems.org for Hutch :)

  20. eglitobias commented on Aug 23, 2026

    @eglitobias
    CollaboratorAuthor

    @michaelklishin Thank you very much. I tested it and was able to release 2.0.0.rc1 via GitHub Actions after a small fix in .github/workflows/release.yml. It now also has the "Built and signed on GitHub Actions" badge: https://rubygems.org/gems/hutch/versions/2.0.0.rc1
    Unless you want to wait longer or want anything else in 2.0.0, I would tag 2.0.0 on Thursday or Friday. I've already updated our main app to version 2.0.0.rc1 so it will be tested by then.

  21. michaelklishin commented on Aug 23, 2026

    @michaelklishin
    Member

    @eglitobias that's excellent news, you being able to give rc1 a try in a real world deployment. Wen can produce a release when you feel confident.

    Let me know.

  22. eglitobias commented on Aug 27, 2026

    @eglitobias
    CollaboratorAuthor

    We have deployed the rc version in several of our environments and have not found any issues so far. Therefore, I have now released v2.0.0.

  23. michaelklishin commented on Aug 27, 2026

    @michaelklishin
    Member

    I wanted to bump Bunny first but OK, we can bump it for 2.0.1.

  24. eglitobias commented on Aug 27, 2026

    @eglitobias
    CollaboratorAuthor

    Oh, I'm sorry—I didn't know that. Is there a bug we haven't found yet?

  25. michaelklishin commented on Aug 27, 2026

    @michaelklishin
    Member

    @eglitobias no, it's just to ship the latest and greatest. No worries.

  26. eglitobias commented on Aug 27, 2026

    @eglitobias
    CollaboratorAuthor

    @michaelklishin Hutch 2.0.0 requires Bunny 3.2.0 (7b16366), which is the latest version of Bunny.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions