@@ -153,7 +153,7 @@ initial_state(Configuration,
153153 version = none ,
154154 pending_receipts = undefined ,
155155 config = Configuration ,
156- route_state = rabbit_routing_util :init_state (),
156+ route_state = rabbit_stomp_routing_util :init_state (),
157157 reply_queues = #{},
158158 frame_transformer = undefined ,
159159 trailing_lf = application :get_env (rabbitmq_stomp , trailing_lf , true ),
@@ -557,7 +557,7 @@ with_destination(Command, Frame, State, Fun) ->
557557 " '~ts ' is not a valid destination.~n "
558558 " Valid destination types are: ~ts .~n " ,
559559 [Content ,
560- string :join (rabbit_routing_util :all_dest_prefixes (),
560+ string :join (rabbit_stomp_routing_util :all_dest_prefixes (),
561561 " , " )], State )
562562 end ;
563563 not_found ->
@@ -652,15 +652,14 @@ server_header() ->
652652
653653do_subscribe (Destination , DestHdr , Frame ,
654654 State = # proc_state {subscriptions = Subs ,
655- route_state = RouteState ,
656655 channel = Channel ,
657656 default_topic_exchange = DfltTopicEx }) ->
658657 check_subscription_access (Destination , State ),
659658 Prefetch =
660659 rabbit_stomp_frame :integer_header (Frame , ? HEADER_PREFETCH_COUNT ,
661660 undefined ),
662661 {AckMode , IsMulti } = rabbit_stomp_util :ack_mode (Frame ),
663- case ensure_endpoint (source , Destination , Frame , Channel , RouteState ) of
662+ case ensure_endpoint (source , Destination , Frame , Channel , State ) of
664663 {ok , Queue , RouteState1 } ->
665664 {ok , ConsumerTag , Description } =
666665 rabbit_stomp_util :consumer_tag (Frame ),
@@ -689,7 +688,7 @@ do_subscribe(Destination, DestHdr, Frame,
689688 exclusive = false ,
690689 arguments = Arguments },
691690 self ()),
692- ok = rabbit_routing_util :ensure_binding (
691+ ok = rabbit_stomp_routing_util :ensure_binding (
693692 Queue , ExchangeAndKey , Channel )
694693 catch exit :Err ->
695694 % % it's safe to delete this queue, it
@@ -790,9 +789,8 @@ maybe_clean_up_queue(Queue, #proc_state{connection = Connection}) ->
790789do_send (Destination , _DestHdr ,
791790 Frame = # stomp_frame {body_iolist = BodyFragments },
792791 State = # proc_state {channel = Channel ,
793- route_state = RouteState ,
794792 default_topic_exchange = DfltTopicEx }) ->
795- case ensure_endpoint (dest , Destination , Frame , Channel , RouteState ) of
793+ case ensure_endpoint (dest , Destination , Frame , Channel , State ) of
796794
797795 {ok , _Q , RouteState1 } ->
798796
@@ -914,7 +912,7 @@ ensure_reply_to(Frame = #stomp_frame{headers = Headers}, State) ->
914912 {Frame , State };
915913 {ok , ReplyTo } ->
916914 {ok , Destination } = rabbit_routing_parser :parse_endpoint (ReplyTo ),
917- case rabbit_routing_util :dest_temp_queue (Destination ) of
915+ case rabbit_stomp_routing_util :dest_temp_queue (Destination ) of
918916 none ->
919917 {Frame , State };
920918 TempQueueId ->
@@ -1131,7 +1129,7 @@ ensure_endpoint(_Direction, {queue, []}, _Frame, _Channel, _State) ->
11311129 {error , {invalid_destination , " Destination cannot be blank" }};
11321130
11331131ensure_endpoint (source , EndPoint , {_ , _ , Headers , _ } = Frame , Channel ,
1134- State = # proc_state {virtual_host = VHost }) ->
1132+ # proc_state {virtual_host = VHost , route_state = RouteState }) ->
11351133 Params =
11361134 [{subscription_queue_name_gen ,
11371135 fun () ->
@@ -1145,16 +1143,16 @@ ensure_endpoint(source, EndPoint, {_, _, Headers, _} = Frame, Channel,
11451143 {default_queue_type , rabbit_vhost :default_queue_type (VHost )}]
11461144 ++ rabbit_stomp_util :build_params (EndPoint , Headers ),
11471145 Arguments = rabbit_stomp_util :build_arguments (Headers ),
1148- rabbit_routing_util :ensure_endpoint (source , Channel , EndPoint ,
1149- [Arguments | Params ], State );
1146+ rabbit_stomp_routing_util :ensure_endpoint (source , Channel , EndPoint ,
1147+ [Arguments | Params ], RouteState );
11501148
11511149ensure_endpoint (Direction , EndPoint , {_ , _ , Headers , _ }, Channel ,
1152- State = # proc_state {virtual_host = VHost }) ->
1150+ # proc_state {virtual_host = VHost , route_state = RouteState }) ->
11531151 Params = [{default_queue_type , rabbit_vhost :default_queue_type (VHost )}
11541152 | rabbit_stomp_util :build_params (EndPoint , Headers )],
11551153 Arguments = rabbit_stomp_util :build_arguments (Headers ),
1156- rabbit_routing_util :ensure_endpoint (Direction , Channel , EndPoint ,
1157- [Arguments | Params ], State ).
1154+ rabbit_stomp_routing_util :ensure_endpoint (Direction , Channel , EndPoint ,
1155+ [Arguments | Params ], RouteState ).
11581156
11591157build_subscription_id (Frame ) ->
11601158 case rabbit_stomp_util :has_durable_header (Frame ) of
0 commit comments