Subject: | Unbind bug |
Date: | Wed, 11 Aug 2010 15:49:22 -0400 |
To: | "bug-Net-RabbitFoot [...] rt.cpan.org" <bug-Net-RabbitFoot [...] rt.cpan.org> |
From: | "Veytser, Leonid - 0665 - MITLL" <veytser [...] ll.mit.edu> |
My info:
- Distro name: Net-RabbitFott-1.02
- Perl version: 5.10.0
- OS: Debian 5 Linux
Error description:
Any time I try to unbind a binding I get the following error:
Can't locate object method "new" via package "Net::AMQP::Protocol::Queue::Unbind" (perhaps you forgot to load "Net::AMQP::Protocol::Queue::Unbind"?) at /usr/local/share/perl/5.10.0/AnyEvent/RabbitMQ.pm line 382.
Sample code:
#!/usr/bin/perl -w
use strict;
use Net::RabbitFoot;
my $xml_spec = "amqp0-8.xml";
my $rf = Net::RabbitFoot->new()->load_xml_spec(
$xml_spec,
)->connect(
host => 'localhost',
port => 5672,
user => 'guest',
pass => 'guest',
vhost => '/',
timeout => 1,
);
my $exchange_name = "test_exchange";
my $queue_name = "test_queue";
my $routing_key = "test_key";
my $ch = $rf->open_channel();
$ch->declare_exchange(exchange => $exchange_name);
$ch->declare_queue(queue => $queue_name);
$ch->bind_queue(
queue => $queue_name,
exchange => $exchange_name,
routing_key => $routing_key,
);
$ch->unbind_queue(
queue => $queue_name,
exchange => $exchange_name,
routing_key => $routing_key,
);
$rf->close;
Thank you,
Lenny
------------------------------------------------------------
Leonid Veytser
MIT Lincoln Laboratory
Advanced Networks and Applications Group
244 Wood St
Lexington, MA 02420
781-981-1395