diff options
| author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2012-02-17 10:06:01 +0000 |
|---|---|---|
| committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2012-02-17 10:06:01 +0000 |
| commit | f84d75d6c7db92d973bd724294ad278867c22bb0 (patch) | |
| tree | 8c79c7de6425c62a5350cbbc7eba83bcdb7196e9 /include | |
| parent | 4fc59f32b9ec02ae6f5bd8a22b31ad1e08cff76e (diff) | |
| download | rabbitmq-server-git-f84d75d6c7db92d973bd724294ad278867c22bb0.tar.gz | |
simplify MsgFun logic for VQ:dropwhile/3 and VQ:ack/3
MsgFun now takes a message (rather than a message reading callback).
Also, only warn of lost messages when DLQ exits abnormally.
Diffstat (limited to 'include')
| -rw-r--r-- | include/rabbit_backing_queue_spec.hrl | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/rabbit_backing_queue_spec.hrl b/include/rabbit_backing_queue_spec.hrl index 918d587a5e..0fc66851ae 100644 --- a/include/rabbit_backing_queue_spec.hrl +++ b/include/rabbit_backing_queue_spec.hrl @@ -25,11 +25,7 @@ -type(async_callback() :: fun ((atom(), fun ((atom(), state()) -> state())) -> 'ok')). -type(duration() :: ('undefined' | 'infinity' | number())). --type(msg_lookup_result() :: {rabbit_types:basic_message(), state()}). - --type(msg_lookup_fun() :: fun((state()) -> msg_lookup_result())). - --type(msg_fun() :: fun((msg_lookup_fun(), state()) -> state())). +-type(msg_fun() :: fun((rabbit_types:basic_message(), ack()) -> 'ok')). -spec(start/1 :: ([rabbit_amqqueue:name()]) -> 'ok'). -spec(stop/0 :: () -> 'ok'). @@ -50,11 +46,11 @@ -spec(drain_confirmed/1 :: (state()) -> {[rabbit_guid:guid()], state()}). -spec(dropwhile/3 :: (fun ((rabbit_types:message_properties()) -> boolean()), - msg_fun(), state()) + msg_fun() | 'undefined', state()) -> state()). -spec(fetch/2 :: (true, state()) -> {fetch_result(ack()), state()}; (false, state()) -> {fetch_result(undefined), state()}). --spec(ack/3 :: ([ack()], msg_fun(), state()) -> +-spec(ack/3 :: ([ack()], msg_fun() | 'undefined', state()) -> {[rabbit_guid:guid()], state()}). -spec(requeue/2 :: ([ack()], state()) -> {[rabbit_guid:guid()], state()}). |
