@@ -399,7 +399,7 @@ recover_deaths([], Acc) ->
399399 Acc ;
400400recover_deaths ([{map , Kvs } | Rem ], Acc ) ->
401401 Queue = key_find (<<" queue" >>, Kvs ),
402- Reason = binary_to_atom (key_find (<<" reason" >>, Kvs )),
402+ Reason = binary_to_existing_atom (key_find (<<" reason" >>, Kvs )),
403403 DA0 = case key_find (<<" original-expiration" >>, Kvs ) of
404404 undefined ->
405405 #{};
@@ -431,8 +431,8 @@ essential_properties(#msg{message_annotations = MA} = Msg) ->
431431 {utf8 , FstR } = message_annotation (<<" x-first-death-reason" >>, Msg , Def ),
432432 {utf8 , LastQ } = message_annotation (<<" x-last-death-queue" >>, Msg , Def ),
433433 {utf8 , LastR } = message_annotation (<<" x-last-death-reason" >>, Msg , Def ),
434- # deaths {first = {FstQ , binary_to_atom (FstR )},
435- last = {LastQ , binary_to_atom (LastR )},
434+ # deaths {first = {FstQ , binary_to_existing_atom (FstR )},
435+ last = {LastQ , binary_to_existing_atom (LastR )},
436436 records = recover_deaths (DeathMaps , #{})};
437437 _ ->
438438 undefined
0 commit comments