Permalink
Browse files

Followed up the RabbitMQ 2.3.1

  • Loading branch information...
1 parent ec13602 commit 61d23f19fb8f33b2b9dd4ba50b0cb262596984d8 @cooldaemon cooldaemon committed Mar 11, 2011
Showing with 17 additions and 10 deletions.
  1. +1 −1 README
  2. +13 −6 lib/AnyEvent/RabbitMQ.pm
  3. +2 −2 lib/AnyEvent/RabbitMQ/Channel.pm
  4. +1 −1 lib/Net/RabbitFoot.pm
View
@@ -10,7 +10,7 @@ You can use Net::RabbitFoot to -
* Publish, consume, get, ack and recover messages
* Select, commit and rollback transactions
-Net::RabbitFoot is known to work with RabbitMQ versions 1.7.2 and version 0-8 of the AMQP specification.
+Net::RabbitFoot is known to work with RabbitMQ versions 2.3.1 and version 0-8 of the AMQP specification.
INSTALLATION
@@ -20,11 +20,12 @@ our $VERSION = '1.02';
sub new {
my $class = shift;
return bless {
- verbose => 0,
+ verbose => 0,
@_,
- _is_open => 0,
- _queue => AnyEvent::RabbitMQ::LocalQueue->new,
- _channels => {},
+ _is_open => 0,
+ _queue => AnyEvent::RabbitMQ::LocalQueue->new,
+ _channels => {},
+ _login_user => '',
}, $class;
}
@@ -39,6 +40,11 @@ sub delete_channel {
return delete $self->{_channels}->{$id};
}
+sub login_user {
+ my $self = shift;
+ return $self->{_login_user};
+}
+
sub load_xml_spec {
my $self = shift;
Net::AMQP::Protocol->load_xml_spec(@_); # die when fail in this line.
@@ -255,7 +261,8 @@ sub _open {
},
'Connection::OpenOk',
sub {
- $self->{_is_open} = 1;
+ $self->{_is_open} = 1;
+ $self->{_login_user} = $args{user};
$args{on_success}->($self);
},
$args{on_failure},
@@ -550,7 +557,7 @@ You can use AnyEvent::RabbitMQ to -
* Publish, consume, get, ack and recover messages
* Select, commit and rollback transactions
-AnyEvnet::RabbitMQ is known to work with RabbitMQ versions 1.7.2 and version 0-8 of the AMQP specification.
+AnyEvnet::RabbitMQ is known to work with RabbitMQ versions 2.3.1 and version 0-8 of the AMQP specification.
=head1 AUTHOR
@@ -329,7 +329,7 @@ sub _header {
message_id => '',
timestamp => time,
type => '',
- user_id => '',
+ user_id => $self->{connection}->login_user,
app_id => '',
cluster_id => '',
%$args,
@@ -499,7 +499,7 @@ sub recover {
$self->{connection}->_push_write(
Net::AMQP::Protocol::Basic::Recover->new(
- requeue => 0,
+ requeue => 1,
%args,
),
$self->{id},
@@ -101,7 +101,7 @@ You can use Net::RabbitFoot to -
* Publish, consume, get, ack and recover messages
* Select, commit and rollback transactions
-Net::RabbitFoot is known to work with RabbitMQ versions 1.7.2 and version 0-8 of the AMQP specification.
+Net::RabbitFoot is known to work with RabbitMQ versions 2.3.1 and version 0-8 of the AMQP specification.
=head1 AUTHOR

0 comments on commit 61d23f1

Please sign in to comment.