27 lines
557 B
Erlang
27 lines
557 B
Erlang
-module(dummy_interceptor).
|
|
|
|
-behaviour(rabbit_channel_interceptor).
|
|
|
|
-include_lib("rabbit_common/include/rabbit.hrl").
|
|
-include_lib("rabbit_common/include/rabbit_framing.hrl").
|
|
|
|
|
|
-compile(export_all).
|
|
|
|
init(_Ch) ->
|
|
undefined.
|
|
|
|
description() ->
|
|
[{description,
|
|
<<"Empties payload on publish">>}].
|
|
|
|
intercept(#'basic.publish'{} = Method, Content, _IState) ->
|
|
Content2 = Content#content{payload_fragments_rev = []},
|
|
{Method, Content2};
|
|
|
|
intercept(Method, Content, _VHost) ->
|
|
{Method, Content}.
|
|
|
|
applies_to() ->
|
|
['basic.publish'].
|