Skip to content

[DEV-7573] Refactor rmqstream library - #26

Merged
zarakay merged 1 commit into
mainfrom
DEV-7573-rmqstream-refactor
Mar 4, 2026
Merged

[DEV-7573] Refactor rmqstream library#26
zarakay merged 1 commit into
mainfrom
DEV-7573-rmqstream-refactor

Conversation

@RabidGhost

@RabidGhost RabidGhost commented Mar 2, 2026

Copy link
Copy Markdown

Description

Refactor the rmqstream rust library. The main goal of the refactor is to bring the library to the 2024 edition, update the rust version to 1.93.1 (latest at time of writing), and update all dependencies to latest versions.

In addition to refactors, load_balancer_mode(true) has been enabled on the RabbitMQ producer. This is not strictly nessesary as stream hostname resolution has now been updated for namespaced hosting capacity service.

Tests have been for logging and tracing setup.

Update to the 2024 edition

In the 2024 editon, static mut is disallowed (an error lint by default). It is very tricky to reason about correctly. We have moved to using static and Mutexs.

Remove unused dependencies

  • the futures crate was unused
  • lazy_static functionality is now included in the standard library

Update to Rust 1.93.1

No issues in upgrading to the latest Rust version. Means all dependencies can go to latest without any issues.

Associated tasks

None

Test Steps

The changes have been tested on staging, and tests for logging have been added. Other tests should be part of the calling code, or the HCS integration tests.

Checklist

Code

  • I have performed a self review of my own code (including checking issues raised when creating the PR).
  • I have added/updated unit tests for these changes, and if not I have explained why they are not necessary.
  • I have commented my code in any hard-to-understand or hacky areas.
  • I have handled all new warnings generated by the compiler or IDE.
  • I have rebased onto the target branch (usually main).

Security

When developing applications, use following guidelines for information security considerations:

  • Access to applications should be protected with security keys/tokens or usernames and passwords;
  • All sessions are encrypted if possible;
  • All application input is sanitised before being acted on (ie SQL statements, etc);
  • Log messages, and especially client-facing ones, must be handled securely and must not leak credentials information (internal URLs, passwords, tokens).
  • I have considered if this change impacts information security and made sure those impacts are handled.

Documentation

  • I have updated the changelog.
    • Fixes to unrealeased change?
  • I have updated any documentation required for these changes.
    • No changes to public API

Breaking Changes

  • I have considered if this is a breaking change and will communicate it with other team members by posting it on the Slack breaking-changes channel.

None

@RabidGhost RabidGhost changed the title Dev 7573 rmqstream refactor [DEV-7573] rmqstream refactor Mar 2, 2026
@RabidGhost
RabidGhost changed the base branch from master to main March 2, 2026 06:56
@RabidGhost
RabidGhost force-pushed the DEV-7573-rmqstream-refactor branch from 5f3289e to 3db631d Compare March 2, 2026 07:03
@RabidGhost
RabidGhost marked this pull request as ready for review March 3, 2026 05:19
@RabidGhost RabidGhost changed the title [DEV-7573] rmqstream refactor [DEV-7573] Refactor rmqstream library Mar 3, 2026
@RabidGhost
RabidGhost requested a review from zarakay March 3, 2026 05:21
- Remove potential UB with `static mut`
- Update rust editon and remove unused dependencies
- Make sure tracing and logging are initialised

Signed-off-by: Mitchell Browne <mitchell.browne@zepben.com>
@RabidGhost
RabidGhost force-pushed the DEV-7573-rmqstream-refactor branch from 4f63888 to c47e980 Compare March 4, 2026 00:34
@zarakay
zarakay merged commit 8612610 into main Mar 4, 2026
3 checks passed
@zarakay
zarakay deleted the DEV-7573-rmqstream-refactor branch March 4, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants