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
Message body not shown because it is not plain text.