Skip to content

Commit

Permalink
Followed up the RabbitMQ 2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldaemon committed Mar 11, 2011
1 parent ec13602 commit 61d23f1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README
Expand Up @@ -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

Expand Down
19 changes: 13 additions & 6 deletions lib/AnyEvent/RabbitMQ.pm
Expand Up @@ -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;
}

Expand All @@ -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.
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/AnyEvent/RabbitMQ/Channel.pm
Expand Up @@ -329,7 +329,7 @@ sub _header {
message_id => '',
timestamp => time,
type => '',
user_id => '',
user_id => $self->{connection}->login_user,
app_id => '',
cluster_id => '',
%$args,
Expand Down Expand Up @@ -499,7 +499,7 @@ sub recover {

$self->{connection}->_push_write(
Net::AMQP::Protocol::Basic::Recover->new(
requeue => 0,
requeue => 1,
%args,
),
$self->{id},
Expand Down
2 changes: 1 addition & 1 deletion lib/Net/RabbitFoot.pm
Expand Up @@ -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
Expand Down

0 comments on commit 61d23f1

Please sign in to comment.