Closed mxsm closed 2 months ago
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
The overall changes implement new functionalities and improvements across the RocketMQ project. Key additions include creating a ClientMetadata
struct for managing client data, modifying existing structs for enhanced functionality, adding new modules for protocol headers, and extending traits for various structs. These changes aim to enhance code usability, visibility, and maintainability.
File/Directory | Change Summary |
---|---|
rocketmq-common/src/common/message/message_queue.rs |
Implemented additional traits for MessageQueue , modified the new method, introduced new methods, and adjusted formatting. |
rocketmq-remoting/Cargo.toml |
Added dependencies: log version 0.4.22 and bytes version 1.6.0 . |
rocketmq-remoting/src/protocol/body/broker_body/cluster_info.rs |
Made broker_addr_table and cluster_addr_table fields public. |
rocketmq-remoting/src/protocol/header/... |
Added new modules for response headers: get_earliest_msg_storetime_response_header , get_max_offset_response_header , get_min_offset_response_header , and search_offset_response_header . |
rocketmq-remoting/src/protocol/route/route_data_view.rs |
Added traits for BrokerData , QueueData , and TopicRouteData . Added new methods to TopicRouteData . |
rocketmq-remoting/src/protocol/static_topic/... |
Changed scope field in TopicQueueMappingInfo to Option<String> . Added get_mock_broker_name function. |
rocketmq-remoting/src/rpc.rs |
Added new modules: client_metadata , rpc_client , rpc_client_hook , and rpc_client_impl . |
rocketmq-remoting/src/rpc/client_metadata.rs |
Introduced ClientMetadata struct with methods for managing topic routes and broker addresses. |
rocketmq-remoting/src/rpc/rpc_client.rs |
Introduced RpcClientLocal trait with methods for handling RPC requests and message queue invocations. |
rocketmq-remoting/src/rpc/rpc_client_hook.rs |
Introduced RpcClientHook trait with methods for handling RPC requests and responses. |
rocketmq-remoting/src/rpc/rpc_client_impl.rs |
Added methods to RpcClientImpl for handling various RPC operations. |
rocketmq-remoting/src/rpc/rpc_client_utils.rs |
Updated create_command_for_rpc_request to conditionally set the body of RemotingCommand . |
rocketmq-remoting/src/rpc/rpc_request.rs |
Updated RpcRequest struct to include the Send trait in the body field. |
rocketmq-remoting/src/rpc/rpc_response.rs |
Added new constructor methods to RpcResponse struct. |
sequenceDiagram
participant Client
participant RpcClientImpl
participant RocketmqDefaultClient
Client->>RpcClientImpl: Request RPC operation
RpcClientImpl->>RocketmqDefaultClient: Invoke remote method
RocketmqDefaultClient-->>RpcClientImpl: Return response
RpcClientImpl-->>Client: Return result
Objective (Issue #750) | Addressed | Explanation |
---|---|---|
Add client metadata struct | ✅ |
In the land of RocketMQ so bright,
New traits and structs come to light.
WithClientMetadata
we steer,
Routes and brokers now so clear.
To every queue and topic's might,
These changes bring us pure delight! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Which Issue(s) This PR Fixes(Closes)
Fixes #750
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
Enhancements
MessageQueue
struct with additional traits and methods for better manipulation and initialization.RpcRequest
andRpcResponse
structs with enhanced constructors and field types.Dependency Updates
log
dependency andbytes
as adev-dependency
inrocketmq-remoting
.Bug Fixes
cluster_info.rs
to improve access control.These changes enhance the functionality, flexibility, and usability of the RocketMQ client, providing more robust management of topic routes and RPC operations.