Duplicate Key name for federation link channels

46 views
Skip to first unread message

prasanth kumar

unread,
May 17, 2024, 4:13:28 AMMay 17
to rabbitmq-users
Hi Team,

We are using RabbitMQ version: 3.12.6 and Erlang/OTP 25 on top of RedHat 8.

For /api/consumers/<VHOST> API we are getting a empty channel object for federation link channel. Due to this few JAVA modules are considering it as invalid json due to duplicate key name and failed to parse the json response received for consumers HTTP API. 

channel response:

   {
      "arguments":{
         "x-priority":-1
      },
      "ack_required":true,
      "active":true,
      "activity_status":"up",
      "channel_details":[
         
      ],

      "channel_details":{
         "connection_name":"x.x.x.x:x.x.x.x -> x.x.x.x:x.x.x.x",
         "name":"x.x.x.x:x.x.x.x -> x.x.x.x:x.x.x.x (1)",
         "node":"rmq1",
         "number":1,
         "peer_host":"x.x.x.x",
         "peer_port":x.x.x.x.,
         "user":"x.x.x.x"
      },
      "consumer_tag":"upstreamfederation",
      "consumer_timeout":1800000,
      "exclusive":false,
      "prefetch_count":50,
      "queue":{
         "name":"queuename",
         "vhost":"vhost"
      }
   },

Error from JAVA: org.json.JSONArray
Exception in thread "main" org.json.JSONException: Duplicate key "channel_details" at 159 [character 20 line 9]
    at org.json.JSONTokener.syntaxError(JSONTokener.java:521)
    at org.json.JSONObject.<init>(JSONObject.java:259)
    at org.json.JSONTokener.nextValue(JSONTokener.java:438)
    at org.json.JSONArray.<init>(JSONArray.java:125)
    at org.json.JSONArray.<init>(JSONArray.java:162)
    at TestList.main(TestList.java:103)

Could please provide your comment on this?

Thank you in Advance!
json_formatter.png

prasanth kumar

unread,
May 27, 2024, 12:13:01 AMMay 27
to rabbitmq-users
Hi Team,

Do we have any update for this issue?

Reply all
Reply to author
Forward
0 new messages