Skip to content

Combined: broker tests in CI, ActiveMQ image, MsgPack deprecation, Elasticsearch and NATS.Net ports, Kafka subscribe fix - #104

Merged
christopherread merged 7 commits into
masterfrom
upgrade/combined-74-79
Oct 25, 2026
Merged

christopherread merged 7 commits into
masterfrom
upgrade/combined-74-79

Conversation

@christopherread

@christopherread christopherread commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Combines five reviewed PRs into one, so master gets a single merge and NuGet a single release, and adds a fix for #103. Each original PR is one commit here, in order; the originals will be closed in favour of this one.

Fixes #74, fixes #76, fixes #77, fixes #78, fixes #79, fixes #103.

Commits

  1. Run broker-backed transport tests in CI (was Run broker-backed transport tests in CI #82)
  2. Official ActiveMQ Classic image in the examples (was Use the official ActiveMQ Classic image in the examples #83): apache/activemq-classic:6.2.0 with admin/admin connection credentials.
  3. Deprecate Obvs.Serialization.MessagePack (was Deprecate Obvs.Serialization.MessagePack (MsgPack.Cli) #96): [Obsolete] warnings pointing to Obvs.Serialization.MessagePack-CSharp. ⚠️ A package owner still has to mark the package deprecated on nuget.org.
  4. NEST → Elastic.Clients.Elasticsearch 9.5.3 (was Port Obvs.Monitoring.ElasticSearch from NEST to Elastic.Clients.Elasticsearch #98). ⚠️ Breaking: ElasticsearchClient replaces IElasticClient, and NodePool replaces IConnectionPool. Index names and document fields are unchanged.
  5. NATS.Client 1.1.8 → NATS.Net (NATS.Client.Core 3.3.1) (was Port Obvs.NATS from NATS.Client to NATS.Net #99). ⚠️ Breaking only for direct MessageSource and MessagePublisher use (INatsConnection instead of Lazy<IConnection>). The fluent configuration and wire format are unchanged.
  6. Kafka subscribe fix (Kafka: messages published straight after subscribing can be missed #103), test first.
    • Bug: Subscribe returned before Kafka assigned partitions, and "latest" was only resolved later. So messages published straight after subscribing were skipped.
    • Fix: Subscribe now waits, for up to 30 seconds, for partition assignment. The assignment handler fixes each partition's start offset there and then: the group's committed offset, or else the current end of the log.
    • CI: the broker warm-up added in Run broker-backed transport tests in CI #82 to hide this problem is removed; only the test topic is created up front.

Resolving #99 with #98 needed small conflict fixes: both changed adjacent lines in Directory.Packages.props (the Elastic line is now in alphabetical order), and #99's NATS test met #101's cancellation-token change. The library code for #96, #98 and #99 is identical to their reviewed PRs.

Testing

  • Locally:
    • Full rebuild with 0 warnings; 129 unit tests pass.
    • Kafka, against a fresh local broker with no warm-up: without the fix, both Kafka tests fail every time (3/3 runs); with it, both pass every time (3/3).
    • The new test, TestMessagePublishedStraightAfterSubscribingIsReceived, publishes immediately after subscribing. The existing TestSendAndReceiveMessage also failed without the warm-up, even after its 2-second wait.
  • CI: the commit with only the new test failed exactly as expected, with both Kafka tests failing. The final run is below.

🤖 Generated with Claude Code

christopherread and others added 7 commits October 25, 2026 08:11
Fixes #74

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #76

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #79

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…icsearch (#98)

Fixes #77

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #78

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eived

Also drop the CI broker warm-up that hid the problem; only the topic is
created up front now. Expected to fail until #103 is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Subscribe returned as soon as the consumer called Subscribe, before Kafka
assigned partitions, and "latest" was only resolved later, so messages
published in between were skipped. Now Subscribe waits (up to 30s) for
partition assignment, and the assignment handler fixes each partition's
start offset there and then: the group's committed offset, or else the
current end of the log.

Fixes #103

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@christopherread christopherread changed the title Combine #82, #83, #96, #98, #99 and fix Kafka subscribe race (#103) Combined: broker tests in CI, ActiveMQ image, MsgPack deprecation, Elasticsearch and NATS.Net ports, Kafka subscribe fix Oct 25, 2026
@christopherread
christopherread marked this pull request as ready for review October 25, 2026 15:21
@christopherread
christopherread merged commit 27cf97a into master Oct 25, 2026
1 check passed
@christopherread
christopherread deleted the upgrade/combined-74-79 branch October 25, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant