[rabbitmq-discuss] virtualhost in stomp

Simon MacMullen simon at rabbitmq.com
Thu Dec 13 11:18:17 GMT 2012


On 12/12/12 16:47, Javier Marcon wrote:
> I have a working perl application (with Net::STOMP plugin) that sends
> messages with normal queues and also with topic, that uses the default
> virtualhost. I am triying to move that application to a virtualhost. I
> created the virtualhost and the user (assigning the tag Admin and regexp
> .* to all permissions) from rabbitmq web interface but I have some problems:
>
> 1) When I try to create the queues for the new virtualhost, the web
> interface asks me the user and password and even putting the right
> user/password combination (with new user or with guest), it keeps asking
> me the user/password. How can I solve it?

I'm afraid that does suggest that you haven't created the permissions 
that you think you have. The logs may give some clue as to what is going on.

> 2) when I try to connect send a message with the scrpts listed below, I
> get the "You must log in using CONNECT first" error. (but connecting
> returns an object). What am I doing wrong?

I don't know Net::Stomp, but I assume that the parameters to 
$stomp->connect() are extra headers to send.

> $stomp->connect({login=>'miusuario', passcode=>'mipass', "virtual-host"=>'/mihost'});

So in that case you should be aware that STOMP defines a "host" header 
(which we use to determine the virtual host to authenticate against), 
*not* "virtual-host".

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list