RockteMQ-AI commented on issue #1436:
URL: 
https://github.com/apache/rocketmq-clients/issues/1436#issuecomment-6313344069

   ## 🤖 Bot Evaluation — Verified Bug
   
   **Classification:** `type/bug` | **Confidence:** High | **Status:** ✅ 
Verified
   
   ### Summary
   
   Both claims in this issue are confirmed against the source code.
   
   ### Bug 1: Timestamps in seconds instead of milliseconds ✅
   
   `MessageView::from_pb_message` (`rust/src/model/message.rs:492-494`) maps 
`prost_types::Timestamp` to only `t.seconds`, discarding `t.nanos`. The Java 
client converts to milliseconds via `Timestamps.toMillis` 
(`MessageViewImpl.java:314-315, 319`).
   
   **Suggested fix:** `t.seconds * 1000 + t.nanos / 1_000_000`
   
   ### Bug 2: Normal messages incorrectly get `delivery_timestamp()` ✅
   
   `Client::receive_message_inner` (`rust/src/client.rs:584-590`) 
unconditionally copies `Content::DeliveryTimestamp` from 
`ReceiveMessageResponse` into every message's 
`system_properties.delivery_timestamp`. In contrast, the Java client keeps this 
value separate as `transportDeliveryTimestamp` (`ConsumerImpl.java:93-113`), 
and `getDeliveryTimestamp()` only reflects the message's own system property 
(null for normal messages).
   
   ### Files Referenced
   
   - `rust/src/model/message.rs` (lines 492-494)
   - `rust/src/client.rs` (lines 565-590)
   - 
`java/client/src/main/java/org/apache/rocketmq/client/java/message/MessageViewImpl.java`
   - 
`java/client/src/main/java/org/apache/rocketmq/client/java/impl/consumer/ConsumerImpl.java`
   
   ### Recommendation
   
   This is a valid bug affecting timestamp accuracy and message classification. 
A fix should:
   1. Convert timestamps to milliseconds (matching Java behavior)
   2. Separate transport delivery timestamp from message delivery timestamp
   
   ---
   *Automated evaluation by github-manager bot. Maintainers: please review and 
confirm.*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to