@@ -73,6 +73,7 @@ subgroups() ->
7373 ,pubsub_separate_connections
7474 ,will_with_disconnect
7575 ,will_without_disconnect
76+ ,decode_basic_properties
7677 ,quorum_queue_rejects
7778 ,events
7879 ,internal_event_handler
@@ -278,6 +279,27 @@ will_without_disconnect(Config) ->
278279
279280 ok = emqtt :disconnect (Sub ).
280281
282+ % % Test that an MQTT connection decodes the AMQP 0.9.1 'P_basic' properties.
283+ % % see https://github.com/rabbitmq/rabbitmq-server/discussions/8252
284+ decode_basic_properties (Config ) ->
285+ App = rabbitmq_mqtt ,
286+ Par = durable_queue_type ,
287+ ok = rpc (Config , application , set_env , [App , Par , quorum ]),
288+ ClientId = Topic = Payload = atom_to_binary (? FUNCTION_NAME ),
289+ C1 = connect (ClientId , Config , [{clean_start , false }]),
290+ {ok , _ , [1 ]} = emqtt :subscribe (C1 , Topic , qos1 ),
291+ QuorumQueues = rpc (Config , rabbit_amqqueue , list_by_type , [rabbit_quorum_queue ]),
292+ ? assertEqual (1 , length (QuorumQueues )),
293+ Ch = rabbit_ct_client_helpers :open_channel (Config ),
294+ amqp_channel :call (Ch , # 'basic.publish' {exchange = <<" amq.topic" >>,
295+ routing_key = Topic },
296+ # amqp_msg {payload = Payload }),
297+ ok = expect_publishes (C1 , Topic , [Payload ]),
298+ ok = emqtt :disconnect (C1 ),
299+ C2 = connect (ClientId , Config , [{clean_start , true }]),
300+ ok = emqtt :disconnect (C2 ),
301+ ok = rpc (Config , application , unset_env , [App , Par ]).
302+
281303quorum_queue_rejects (Config ) ->
282304 {_Conn , Ch } = rabbit_ct_client_helpers :open_connection_and_channel (Config ),
283305 Name = atom_to_binary (? FUNCTION_NAME ),
0 commit comments