@@ -155,7 +155,8 @@ groups() ->
155155 tcp_back_pressure_rabbitmq_internal_flow_classic_queue ,
156156 tcp_back_pressure_rabbitmq_internal_flow_quorum_queue ,
157157 session_max_per_connection ,
158- link_max_per_session
158+ link_max_per_session ,
159+ reserved_annotation
159160 ]},
160161
161162 {cluster_size_3 , [shuffle ],
@@ -5917,6 +5918,32 @@ link_max_per_session(Config) ->
59175918 flush (test_succeeded ),
59185919 ok = rpc (Config , application , set_env , [App , Par , Default ]).
59195920
5921+ reserved_annotation (Config ) ->
5922+ OpnConf = connection_config (Config ),
5923+ {ok , Connection } = amqp10_client :open_connection (OpnConf ),
5924+ {ok , Session } = amqp10_client :begin_session (Connection ),
5925+ TargetAddr = rabbitmq_amqp_address :exchange (<<" amq.fanout" >>),
5926+ {ok , Sender } = amqp10_client :attach_sender_link_sync (
5927+ Session , <<" sender" >>, TargetAddr , settled ),
5928+ ok = wait_for_credit (Sender ),
5929+
5930+ Msg = amqp10_msg :set_message_annotations (
5931+ #{<<" reserved-key" >> => 1 },
5932+ amqp10_msg :new (<<" tag" >>, <<" payload" >>, true )),
5933+ ok = amqp10_client :send_msg (Sender , Msg ),
5934+ receive
5935+ {amqp10_event ,
5936+ {session , Session ,
5937+ {ended ,
5938+ # 'v1_0.error' {description = {utf8 , Description }}}}} ->
5939+ ? assertMatch (
5940+ <<" {reserved_annotation_key,{symbol,<<\" reserved-key\" >>}}" , _ /binary >>,
5941+ Description )
5942+ after 5000 -> flush (missing_ended ),
5943+ ct :fail ({missing_event , ? LINE })
5944+ end ,
5945+ ok = close_connection_sync (Connection ).
5946+
59205947% % internal
59215948% %
59225949
0 commit comments