From 574935906bc7d851058322719f08a662b9a18b2d Mon Sep 17 00:00:00 2001 From: Dave Lambley Date: Fri, 22 May 2020 18:58:22 +0100 Subject: [PATCH 1/2] RT#106550 Add no_ack param to get() Merge in patch from Julio Polo https://rt.cpan.org/Ticket/Display.html?id=106550 --- Changes | 1 + lib/AnyEvent/RabbitMQ/Channel.pm | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index dfebc36..caa66c3 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ Revision history for Perl extension AnyEvent::RabbitMQ + - Add "no_ack" flag to "get" method. (Julio Polo) - Prevent channelMax from overflowing. https://rt.cpan.org/Ticket/Display.html?id=97716 (Carl Hörberg) - Merge in documentation patch from diff --git a/lib/AnyEvent/RabbitMQ/Channel.pm b/lib/AnyEvent/RabbitMQ/Channel.pm index 50d4f63..4edd382 100644 --- a/lib/AnyEvent/RabbitMQ/Channel.pm +++ b/lib/AnyEvent/RabbitMQ/Channel.pm @@ -617,12 +617,14 @@ sub get { my $self = shift; my ($cb, $failure_cb, %args) = $self->_delete_cbs(@_); + my $no_ack = delete $args{no_ack} // 1; + return $self if !$self->_check_open($failure_cb); $self->{connection}->_push_write_and_read( 'Basic::Get', { - no_ack => 1, + no_ack => $no_ack, %args, # queue ticket => 0, }, @@ -1385,6 +1387,10 @@ a notification that there was nothing to collect from the queue. This callback will be called if an error is signalled on this channel. +=item no_ack + +0 or 1, default 1 + =back =head2 ack From 53f912816e3e09c37f5cc1be9a17b5fe5be43f15 Mon Sep 17 00:00:00 2001 From: Dave Lambley Date: Sat, 23 May 2020 12:41:55 +0100 Subject: [PATCH 2/2] Add contributor --- dist.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/dist.ini b/dist.ini index 470b1ab..5e6d7dc 100644 --- a/dist.ini +++ b/dist.ini @@ -15,6 +15,7 @@ x_contributors = Ruslan Zakirov x_contributors = Masahito Ikuta x_contributors = Rod Taylor x_contributors = Carl Hörberg +x_contributors = Julio Polo [InstallGuide] [CPANFile]