You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sunil_mlec <su...@gmail.com> on 2009/02/11 13:27:44 UTC
Net::Stomp throwing error when connecting to ActiveMQ
use Net::Stomp;
my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' }
);
$stomp->connect( { login => 'guest', passcode => 'guest' } );
$stomp->send(
{ destination => 'foo', body => 'test message' } );
$stomp->disconnect;
I am using ActiveMQ 5.2.0 version.
When I try to run the above program, I am getting the following error.
Error reading command: at Net/Stomp/Frame.pm line 37.
Can anyone help me in resolving this?
Thanks.
--
View this message in context: http://www.nabble.com/Net%3A%3AStomp-throwing-error-when-connecting-to-ActiveMQ-tp21953691p21953691.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Net::Stomp throwing error when connecting to ActiveMQ
Posted by sunil_mlec <su...@gmail.com>.
I have commented out $stomp->send ( { destination => 'foo', body => 'test
message' } );
Even then, the same result.
The problem is with $stomp->connect();
Thanks.
Roger Hoover wrote:
>
> Maybe foo is not a valid destination and should be /queue/foo ?
>
> On 2/11/09, sunil_mlec <su...@gmail.com> wrote:
>>
>> use Net::Stomp;
>> my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613'
>> }
>> );
>> $stomp->connect( { login => 'guest', passcode => 'guest' } );
>> $stomp->send(
>> { destination => 'foo', body => 'test message' } );
>> $stomp->disconnect;
>>
>> I am using ActiveMQ 5.2.0 version.
>> When I try to run the above program, I am getting the following error.
>> Error reading command: at Net/Stomp/Frame.pm line 37.
>>
>> Can anyone help me in resolving this?
>>
>> Thanks.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Net%3A%3AStomp-throwing-error-when-connecting-to-ActiveMQ-tp21953691p21953691.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Net%3A%3AStomp-throwing-error-when-connecting-to-ActiveMQ-tp21953691p21969140.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Net::Stomp throwing error when connecting to ActiveMQ
Posted by Roger Hoover <ro...@gmail.com>.
Maybe foo is not a valid destination and should be /queue/foo ?
On 2/11/09, sunil_mlec <su...@gmail.com> wrote:
>
> use Net::Stomp;
> my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' }
> );
> $stomp->connect( { login => 'guest', passcode => 'guest' } );
> $stomp->send(
> { destination => 'foo', body => 'test message' } );
> $stomp->disconnect;
>
> I am using ActiveMQ 5.2.0 version.
> When I try to run the above program, I am getting the following error.
> Error reading command: at Net/Stomp/Frame.pm line 37.
>
> Can anyone help me in resolving this?
>
> Thanks.
>
> --
> View this message in context:
> http://www.nabble.com/Net%3A%3AStomp-throwing-error-when-connecting-to-ActiveMQ-tp21953691p21953691.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>