Skip to content

Conversation

@Zerpet
Copy link
Member

@Zerpet Zerpet commented Aug 25, 2025

This pull request introduces server version validation to the connection process, ensuring that the client only connects to supported RabbitMQ servers (version 4.0.0 or higher). It also adds internal utilities for version checks, updates dependencies, and improves type hints for remote properties.

Connection and Version Validation:

  • Added a _validate_server_properties method in connection.py to ensure the server is RabbitMQ and its version is at least 4.0.0, raising a ValidationCodeException otherwise. Also added _is_server_version_gte_4_2_0 for feature gating based on server version.
  • Enforced a wait for the connection to reach the REMOTE_ACTIVE state before proceeding, making the connection process more robust. (_utils.py)

Dependency and Type Improvements:

  • Added the packaging library as a dependency for reliable version parsing and comparison. (pyproject.toml, import in connection.py) [1] [2]
  • Improved the type hint for the remote_properties property to explicitly indicate it may return Optional[Data]. (_endpoints.py)

Edit: trying out the copilot PR summary

@Zerpet Zerpet self-assigned this Aug 25, 2025
@Zerpet Zerpet requested a review from Gsantomaggio August 25, 2025 15:52
@Zerpet Zerpet linked an issue Aug 25, 2025 that may be closed by this pull request
@Zerpet Zerpet force-pushed the check-server-version branch from 83a1f21 to 9e82118 Compare August 25, 2025 15:54
@Zerpet Zerpet force-pushed the check-server-version branch from 9e82118 to 3143443 Compare August 25, 2025 15:58
This will be useful when we implement SQL filter support.
@Zerpet Zerpet added this to the 0.1.1 milestone Aug 27, 2025
@Gsantomaggio Gsantomaggio merged commit 43159ae into main Sep 9, 2025
1 check passed
@Gsantomaggio Gsantomaggio deleted the check-server-version branch September 9, 2025 06:55
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.

Check if the broker is RabbitMQ and the Version is >= 4.0

3 participants