@@ -218,22 +218,12 @@ publish_delivered(Msg, MsgProps, ChPid,
218218 State = # passthrough {bq = BQ , bqs = BQS }) ->
219219 ? passthrough2 (publish_delivered (Msg , MsgProps , ChPid , BQS )).
220220
221- % % TODO this is a hack. The BQ api does not give us enough information
222- % % here - if we had the Msg we could look at its priority and forward
223- % % to the appropriate sub-BQ. But we don't so we are stuck.
224- % %
225- % % But fortunately VQ ignores discard/4, so we can too, *assuming we
226- % % are talking to VQ*. discard/4 is used by HA, but that's "above" us
227- % % (if in use) so we don't break that either, just some hypothetical
228- % % alternate BQ implementation.
229- discard (_MsgId , _ChPid , State = # state {}) ->
230- State ;
231- % % We should have something a bit like this here:
232- % % pick1(fun (_P, BQSN) ->
233- % % BQ:discard(MsgId, ChPid, BQSN)
234- % % end, Msg, State);
235- discard (MsgId , ChPid , State = # passthrough {bq = BQ , bqs = BQS }) ->
236- ? passthrough1 (discard (MsgId , ChPid , BQS )).
221+ discard (Msg , ChPid , State = # state {bq = BQ }) ->
222+ pick1 (fun (_P , BQSN ) ->
223+ BQ :discard (Msg , ChPid , BQSN )
224+ end , Msg , State );
225+ discard (Msg , ChPid , State = # passthrough {bq = BQ , bqs = BQS }) ->
226+ ? passthrough1 (discard (Msg , ChPid , BQS )).
237227
238228drain_confirmed (State = # state {bq = BQ }) ->
239229 fold_append2 (fun (_P , BQSN ) -> BQ :drain_confirmed (BQSN ) end , State );
0 commit comments