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

kpvdr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-interop-test.git

commit 35193458bdc153cfb393c5cab98bfac54023acf0
Author: QIT Development Team <[email protected]>
AuthorDate: Mon Aug 3 12:40:48 2026 -0400

    Fix Rhea MapMessage/StreamMessage encoding and decoding
    
    - Sender: use plain object for map body (auto-encoded as AmqpValue map)
    - Sender: use sequence_section() for list body (produces AmqpSequence)
    - Receiver: unwrap Section objects for StreamMessage list body
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 shims/javascript-rhea/shim.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/shims/javascript-rhea/shim.js b/shims/javascript-rhea/shim.js
index af3b8fa..583a903 100755
--- a/shims/javascript-rhea/shim.js
+++ b/shims/javascript-rhea/shim.js
@@ -8,6 +8,7 @@
 'use strict';
 
 const rhea = require('rhea');
+const rhea_message = require('rhea/lib/message');
 const { v4: uuidv4 } = require('uuid');
 
 // Parse command line arguments
@@ -107,8 +108,9 @@ function decodeJmsMessage(body, jmsMsgType) {
         }
         return { type: 'none', value: null };
     } else if (jmsMsgType === JMS_STREAM_MESSAGE) {
-        if (Array.isArray(body) && body.length > 0) {
-            return TypeDecoder.decode(body[0]);
+        const listData = (body && body.content !== undefined) ? body.content : 
body;
+        if (Array.isArray(listData) && listData.length > 0) {
+            return TypeDecoder.decode(listData[0]);
         }
         return { type: 'none', value: null };
     } else {
@@ -426,11 +428,11 @@ function send(options) {
                 const encodedValue = TypeEncoder.encode(subType, 
msgData.value);
                 const mapObj = {};
                 mapObj[key] = encodedValue;
-                body = rhea.types.wrap_map(mapObj);
+                body = mapObj;
             } else if (amqpType === 'list') {
                 const subType = msgData.type || 'string';
                 const encodedValue = TypeEncoder.encode(subType, 
msgData.value);
-                body = rhea.types.wrap_list([encodedValue]);
+                body = rhea_message.sequence_section([encodedValue]);
             } else {
                 body = TypeEncoder.encode(amqpType, msgData.value);
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to