Skip to content

Commit

Permalink
Merge pull request #46 from beano/feature-consumer-opts
Browse files Browse the repository at this point in the history
Expose arguments on consume API
  • Loading branch information
andersfugmann authored Jan 29, 2024
2 parents bd7ecbf + 1208231 commit 6813dda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions async/src/queue.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type 'a consumer = { channel: 'a Channel.t;
writer: Message.t Pipe.Writer.t }

(** Consume message from a queue. *)
let consume ~id ?(no_local=false) ?(no_ack=false) ?(exclusive=false)
let consume ~id ?(no_local=false) ?(no_ack=false) ?(exclusive=false) ?(arguments=[])
?on_cancel channel t =
let open Spec.Basic in
let (reader, writer) = Pipe.create () in
Expand All @@ -77,7 +77,7 @@ let consume ~id ?(no_local=false) ?(no_ack=false) ?(exclusive=false)
no_ack;
exclusive;
no_wait = false;
arguments = [];
arguments;
}
in
let var = Ivar.create () in
Expand Down
1 change: 1 addition & 0 deletions async/src/queue.mli
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ val consume :
?no_local:bool ->
?no_ack:bool ->
?exclusive:bool ->
?arguments:Types.table ->
?on_cancel:(unit -> unit) ->
'a Channel.t ->
t ->
Expand Down

0 comments on commit 6813dda

Please sign in to comment.