@@ -207,13 +207,13 @@ publish(Msg, MsgProps, IsDelivered, ChPid, Flow,
207207 ? passthrough1 (publish (Msg , MsgProps , IsDelivered , ChPid , Flow , BQS )).
208208
209209batch_publish (Publishes , ChPid , Flow , State = # state {bq = BQ , bqss = [{MaxP , _ } |_ ]}) ->
210- PubDict = partition_publish_batch (Publishes , MaxP ),
210+ PubMap = partition_publish_batch (Publishes , MaxP ),
211211 lists :foldl (
212212 fun ({Priority , Pubs }, St ) ->
213213 pick1 (fun (_P , BQSN ) ->
214214 BQ :batch_publish (Pubs , ChPid , Flow , BQSN )
215215 end , Priority , St )
216- end , State , orddict :to_list (PubDict ));
216+ end , State , maps :to_list (PubMap ));
217217batch_publish (Publishes , ChPid , Flow ,
218218 State = # passthrough {bq = BQ , bqs = BQS }) ->
219219 ? passthrough1 (batch_publish (Publishes , ChPid , Flow , BQS )).
@@ -229,7 +229,7 @@ publish_delivered(Msg, MsgProps, ChPid, Flow,
229229 ? passthrough2 (publish_delivered (Msg , MsgProps , ChPid , Flow , BQS )).
230230
231231batch_publish_delivered (Publishes , ChPid , Flow , State = # state {bq = BQ , bqss = [{MaxP , _ } |_ ]}) ->
232- PubDict = partition_publish_delivered_batch (Publishes , MaxP ),
232+ PubMap = partition_publish_delivered_batch (Publishes , MaxP ),
233233 {PrioritiesAndAcks , State1 } =
234234 lists :foldl (
235235 fun ({Priority , Pubs }, {PriosAndAcks , St }) ->
@@ -241,7 +241,7 @@ batch_publish_delivered(Publishes, ChPid, Flow, State = #state{bq = BQ, bqss = [
241241 {priority_on_acktags (P , AckTags ), BQSN1 }
242242 end , Priority , St ),
243243 {[PriosAndAcks1 | PriosAndAcks ], St1 }
244- end , {[], State }, orddict :to_list (PubDict )),
244+ end , {[], State }, maps :to_list (PubMap )),
245245 {lists :reverse (PrioritiesAndAcks ), State1 };
246246batch_publish_delivered (Publishes , ChPid , Flow ,
247247 State = # passthrough {bq = BQ , bqs = BQS }) ->
@@ -327,7 +327,7 @@ ackfold(MsgFun, Acc, State = #state{bq = BQ}, AckTags) ->
327327 AckTagsByPriority = partition_acktags (AckTags ),
328328 fold2 (
329329 fun (P , BQSN , AccN ) ->
330- case orddict :find (P , AckTagsByPriority ) of
330+ case maps :find (P , AckTagsByPriority ) of
331331 {ok , ATagsN } -> {AccN1 , BQSN1 } =
332332 BQ :ackfold (MsgFun , AccN , BQSN , ATagsN ),
333333 {priority_on_acktags (P , AccN1 ), BQSN1 };
@@ -439,7 +439,7 @@ zip_msgs_and_acks(Msgs, AckTags, Accumulator, #state{bqss = [{MaxP, _} |_]}) ->
439439 MsgsByPriority = partition_publish_delivered_batch (Msgs , MaxP ),
440440 lists :foldl (fun (Acks , MAs ) ->
441441 {P , _AckTag } = hd (Acks ),
442- Pubs = orddict : fetch (P , MsgsByPriority ),
442+ Pubs = maps : get (P , MsgsByPriority ),
443443 MAs0 = zip_msgs_and_acks (Pubs , Acks ),
444444 MAs ++ MAs0
445445 end , Accumulator , AckTags );
@@ -527,7 +527,7 @@ fold_min2(Fun, State) ->
527527fold_by_acktags2 (Fun , AckTags , State ) ->
528528 AckTagsByPriority = partition_acktags (AckTags ),
529529 fold_append2 (fun (P , BQSN ) ->
530- case orddict :find (P , AckTagsByPriority ) of
530+ case maps :find (P , AckTagsByPriority ) of
531531 {ok , AckTagsN } -> Fun (AckTagsN , BQSN );
532532 error -> {[], BQSN }
533533 end
@@ -597,11 +597,11 @@ partition_publishes(Publishes, ExtractMsg, MaxP) ->
597597 Partitioned =
598598 lists :foldl (fun (Pub , Dict ) ->
599599 Msg = ExtractMsg (Pub ),
600- rabbit_misc :orddict_cons (priority (Msg , MaxP ), Pub , Dict )
601- end , orddict :new (), Publishes ),
602- orddict :map (fun (_P , RevPubs ) ->
603- lists :reverse (RevPubs )
604- end , Partitioned ).
600+ rabbit_misc :maps_cons (priority (Msg , MaxP ), Pub , Dict )
601+ end , maps :new (), Publishes ),
602+ maps :map (fun (_P , RevPubs ) ->
603+ lists :reverse (RevPubs )
604+ end , Partitioned ).
605605
606606
607607priority_bq (Priority , [{MaxP , _ } | _ ] = BQSs ) ->
@@ -625,14 +625,14 @@ add_maybe_infinity(infinity, _) -> infinity;
625625add_maybe_infinity (_ , infinity ) -> infinity ;
626626add_maybe_infinity (A , B ) -> A + B .
627627
628- partition_acktags (AckTags ) -> partition_acktags (AckTags , orddict :new ()).
628+ partition_acktags (AckTags ) -> partition_acktags (AckTags , maps :new ()).
629629
630630partition_acktags ([], Partitioned ) ->
631- orddict :map (fun (_P , RevAckTags ) ->
632- lists :reverse (RevAckTags )
633- end , Partitioned );
631+ maps :map (fun (_P , RevAckTags ) ->
632+ lists :reverse (RevAckTags )
633+ end , Partitioned );
634634partition_acktags ([{P , AckTag } | Rest ], Partitioned ) ->
635- partition_acktags (Rest , rabbit_misc :orddict_cons (P , AckTag , Partitioned )).
635+ partition_acktags (Rest , rabbit_misc :maps_cons (P , AckTag , Partitioned )).
636636
637637priority_on_acktags (P , AckTags ) ->
638638 [case Tag of
0 commit comments