Skip Menu |

This queue is for tickets about the Net-STOMP-Client CPAN distribution.

Report information
The Basics
Id: 90069
Status: resolved
Priority: 0/
Queue: Net-STOMP-Client

People
Owner: Nobody in particular
Requestors: patrick.hagen [...] kit.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: regarding stomp->connect and Net::STOMP::Client::Tutorial
Date: Tue, 05 Nov 2013 19:43:51 +0100
To: bug-Net-STOMP-Client [...] rt.cpan.org
From: "von der Hagen, Patrick (SCC)" <patrick.hagen [...] kit.edu>
Dear Lionel, first of all, I'm glad I finally found your library, after fiddling aroud with a couple of alternatives for AMQP or STOMP which just didn't work out. However, it took some time to get up and running, since there is no hint anywhere that a host-value can (and probably in many cases needs to) be passed at stomp->connect like $stomp->connect( login => "test", passcode => "test", host=>'/' ); I tried Net::STOMP::Client against rabbitmq like this first: $stomp = Net::STOMP::Client->new(uri => "stomp+ssl://servername:61614"); $peer = $stomp->peer(); printf("connected to broker %s (IP %s), port %d\n", $peer->host(), $peer->addr(), $peer->port()); $stomp->connect( login => "eval", passcode => "eval" ); According to rabbitmq: =ERROR REPORT==== 5-Nov-2013::19:23:55 === STOMP error frame sent: Message: "Bad CONNECT" Detail: "Virtual host 'servername' access denied" Server private detail: none So, when I did not pass "host=>'/'" to stomp->connect, implicitly Net::STOMP::Client added "host=>'servername'", which IMHO is no reasonable assumption. I'd definitly suggest an update to the tutorial. Perhaps stomp->connect should use "host=>'/'" as default, but I have little experience with AMQP and STOMP yet, so I might be mistaken. And by the way: SSL is quite simple, unless you need to use a client-certificate. The tutorial makes it look way to difficult. -- Karlsruher Institut für Technologie (KIT) Steinbuch Centre for Computing (SCC) Patrick von der Hagen Zirkel 2, Gebäude 20.21, Raum 005.1 76131 Karlsruhe Telefon: +49 721 608-46433 E-Mail: hagen@kit.edu Web: http://www.scc.kit.edu KIT - Universität des Landes Baden-Württemberg und nationales Forschungszentrum in der Helmholtz-Gemeinschaft
Download smime.p7s
application/pkcs7-signature 4.8k

Message body not shown because it is not plain text.

The host header is documented in the STOMP specification: http://stomp.github.io/stomp-specification-1.2.html#CONNECT_or_STOMP_Frame I have now extended the tutorial to explain how to use it. This will appear in versions 2.1_2 and later. Note that the problem exists only on RabbitMQ where the default virtual host is /. On ActiveMQ or Apollo, Net::STOMP::Client's defaults work fine. Thanks for reporting this.