Skip to content

Commit 601e287

Browse files
committed
wip
1 parent 91c502e commit 601e287

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

deps/rabbit/src/rabbit_stream_queue.erl

+29-29
Original file line numberDiff line numberDiff line change
@@ -1270,39 +1270,39 @@ parse_uncompressed_subbatch(
12701270
parse_uncompressed_subbatch(Rem, Offset + 1, StartOffset, QName,
12711271
Name, LocalPid, Filter, Acc).
12721272

1273-
entry_to_msg(Entry, Offset, #resource{kind = queue, name = QName}, Name, LocalPid, Filter) ->
1273+
entry_to_msg(Entry, Offset, #resource{kind = queue, name = _QName}, Name, LocalPid, Filter) ->
12741274
Mc0 = mc:init(mc_amqp, Entry, #{}),
12751275
%% If exchange or routing keys annotation isn't present the entry most likely came
12761276
%% from the rabbitmq-stream plugin so we'll choose defaults that simulate use
12771277
%% of the direct exchange.
1278-
XHeaders = mc:x_headers(Mc0),
1279-
Exchange = case XHeaders of
1280-
#{<<"x-exchange">> := {utf8, X}} ->
1281-
X;
1282-
_ ->
1283-
<<>>
1284-
end,
1285-
RKeys0 = case XHeaders of
1286-
#{<<"x-cc">> := {list, CCs}} ->
1287-
[CC || {utf8, CC} <- CCs];
1288-
_ ->
1289-
[]
1290-
end,
1291-
RKeys1 = case XHeaders of
1292-
#{<<"x-routing-key">> := {utf8, RK}} ->
1293-
[RK | RKeys0];
1294-
_ ->
1295-
RKeys0
1296-
end,
1297-
RKeys = case RKeys1 of
1298-
[] ->
1299-
[QName];
1300-
_ ->
1301-
RKeys1
1302-
end,
1303-
Mc1 = mc:set_annotation(?ANN_EXCHANGE, Exchange, Mc0),
1304-
Mc2 = mc:set_annotation(?ANN_ROUTING_KEYS, RKeys, Mc1),
1305-
Mc = mc:set_annotation(<<"x-stream-offset">>, Offset, Mc2),
1278+
% XHeaders = mc:x_headers(Mc0),
1279+
% Exchange = case XHeaders of
1280+
% #{<<"x-exchange">> := {utf8, X}} ->
1281+
% X;
1282+
% _ ->
1283+
% <<>>
1284+
% end,
1285+
% RKeys0 = case XHeaders of
1286+
% #{<<"x-cc">> := {list, CCs}} ->
1287+
% [CC || {utf8, CC} <- CCs];
1288+
% _ ->
1289+
% []
1290+
% end,
1291+
% RKeys1 = case XHeaders of
1292+
% #{<<"x-routing-key">> := {utf8, RK}} ->
1293+
% [RK | RKeys0];
1294+
% _ ->
1295+
% RKeys0
1296+
% end,
1297+
% RKeys = case RKeys1 of
1298+
% [] ->
1299+
% [QName];
1300+
% _ ->
1301+
% RKeys1
1302+
% end,
1303+
% Mc1 = mc:set_annotation(?ANN_EXCHANGE, Exchange, Mc0),
1304+
% Mc2 = mc:set_annotation(?ANN_ROUTING_KEYS, RKeys, Mc1),
1305+
Mc = mc:set_annotation(<<"x-stream-offset">>, Offset, Mc0),
13061306
case rabbit_amqp_filtex:filter(Filter, Mc) of
13071307
true ->
13081308
{Name, LocalPid, Offset, false, Mc};

0 commit comments

Comments
 (0)