|
56 | 56 | -export([update_user_state/2]).
|
57 | 57 |
|
58 | 58 | -export([init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2,
|
59 |
| - handle_info/2, handle_pre_hibernate/1, handle_post_hibernate/1, |
60 |
| - prioritise_call/4, prioritise_cast/3, prioritise_info/3, |
61 |
| - format_message_queue/2]). |
| 59 | + handle_info/2, format_status/1]). |
62 | 60 |
|
63 | 61 | %% Internal
|
64 | 62 | -export([list_local/0, emit_info_local/3, deliver_reply_local/3]).
|
@@ -557,26 +555,6 @@ init([Channel, ReaderPid, WriterPid, ConnPid, ConnName, Protocol, User, VHost,
|
557 | 555 | State3 = init_tick_timer(State2),
|
558 | 556 | {ok, State3}.
|
559 | 557 |
|
560 |
| -prioritise_call(Msg, _From, _Len, _State) -> |
561 |
| - case Msg of |
562 |
| - info -> 9; |
563 |
| - {info, _Items} -> 9; |
564 |
| - _ -> 0 |
565 |
| - end. |
566 |
| - |
567 |
| -prioritise_cast(Msg, _Len, _State) -> |
568 |
| - case Msg of |
569 |
| - {confirm, _MsgSeqNos, _QPid} -> 5; |
570 |
| - {reject_publish, _MsgSeqNos, _QPid} -> 5; |
571 |
| - _ -> 0 |
572 |
| - end. |
573 |
| - |
574 |
| -prioritise_info(Msg, _Len, _State) -> |
575 |
| - case Msg of |
576 |
| - emit_stats -> 7; |
577 |
| - _ -> 0 |
578 |
| - end. |
579 |
| - |
580 | 558 | handle_call(flush, _From, State) ->
|
581 | 559 | reply(ok, State);
|
582 | 560 |
|
@@ -822,7 +800,13 @@ terminate(_Reason,
|
822 | 800 | code_change(_OldVsn, State, _Extra) ->
|
823 | 801 | {ok, State}.
|
824 | 802 |
|
825 |
| -format_message_queue(Opt, MQ) -> rabbit_misc:format_message_queue(Opt, MQ). |
| 803 | +format_status(Status) -> |
| 804 | + maps:map( |
| 805 | + fun(state, State = #ch{unacked_message_q = UnackedMessageQ}) -> |
| 806 | + State#ch{unacked_message_q = lqueue:len(UnackedMessageQ)}; |
| 807 | + (_,Value) -> |
| 808 | + Value |
| 809 | + end, Status). |
826 | 810 |
|
827 | 811 | get_consumer_timeout() ->
|
828 | 812 | case application:get_env(rabbit, consumer_timeout) of
|
|
0 commit comments