This is an automated email from the ASF dual-hosted git repository.

piotr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git


The following commit(s) were added to refs/heads/master by this push:
     new ec96f35d chore(test): improve consumption message log (#1780)
ec96f35d is described below

commit ec96f35d900a23abab96ee01f9f9257e17efc1fc
Author: Cancai Cai <[email protected]>
AuthorDate: Mon May 12 20:26:18 2025 +0800

    chore(test): improve consumption message log (#1780)
---
 core/examples/src/shared/stream.rs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/core/examples/src/shared/stream.rs 
b/core/examples/src/shared/stream.rs
index e6d3a887..d4ab2c7f 100644
--- a/core/examples/src/shared/stream.rs
+++ b/core/examples/src/shared/stream.rs
@@ -28,9 +28,12 @@ impl MessageConsumer for PrintEventConsumer {
         // Extract message payload as raw bytes
         let raw_message = message.message.payload.as_ref();
         // Convert raw bytes into string
-        let message = String::from_utf8_lossy(raw_message);
+        let payload = String::from_utf8_lossy(raw_message);
         // Print message
-        println!("Message received: {}", message);
+        println!(
+            "Message received: {} at offset: {} in partition ID: {}",
+            payload, message.message.header.offset, message.partition_id
+        );
 
         Ok(())
     }

Reply via email to