[rabbitmq-discuss] Help setting you RabbitMQ and testing with the C client

bruce bushby bruce.bushby at gmail.com
Tue Apr 12 10:32:08 BST 2011


Hello

I'm looking for some help setting up rabbitmq-server.

Rabbit server installed:
rabbitmq-server-2.2.0-1.fc14.noarch

C-Client installed:
/usr/local/bin/amqp-delete-queue
/usr/local/bin/amqp-get
/usr/local/bin/amqp-declare-queue
/usr/local/bin/amqp-publish
/usr/local/bin/amqp-consume


I then went on to configure the server...

Create vhost:
[root at plxweb01 rabbitmq]#
[root at plxweb01 rabbitmq]# rabbitmqctl add_vhost testvhost
Creating vhost "testvhost" ...
...done.
[root at plxweb01 rabbitmq]#


Create user:
[root at plxweb01 rabbitmq]#
rabbitmqctl add_user testuser testuser123
Creating user "testuser" ...
...done.
[root at plxweb01 rabbitmq]#
[root at plxweb01 rabbitmq]#


Set user permissions:
[root at plxweb01 rabbitmq]#
[root at plxweb01 rabbitmq]# rabbitmqctl set_permissions -p testvhost testuser
".*" ".*" ".*"
Setting permissions for user "testuser" in vhost "testvhost" ...
...done.
[root at plxweb01 rabbitmq]#


Declare a queue:
[root at plxweb01 rabbitmq]#
[root at plxweb01 rabbitmq]# /usr/local/bin/amqp-declare-queue
--server="plxweb01" --vhost="testvhost" --username="testuser"
--password="testuser123" --queue="testqueue"
testqueue
[root at plxweb01 rabbitmq]#



I don't understand the concept of an exchange, I thought there were three
types (direct,fanout & topic) ......but how do I specify the exchange? Do I
need to create/associate an exchange?

[root at plxweb01 rabbitmq]#
[root at plxweb01 rabbitmq]# /usr/local/bin/amqp-publish --server="plxweb01"
--vhost="testvhost" --username="testuser" --password="testuser123"
--exchange="direct" --body="test message"
closing channel: server channel error 404, message: NOT_FOUND - no exchange
'direct' in vhost 'testvhost'
[root at plxweb01 rabbitmq]#


It looks like I can publish something by specifying an empty string for
exchange:

[root at plxweb01 rabbitmq]# /usr/local/bin/amqp-publish --server="plxweb01"
--vhost="testvhost" --username="testuser" --password="testuser123"
--exchange="" --body="test message"
[root at plxweb01 rabbitmq]#
[root at plxweb01 rabbitmq]#


But I can't read from the "default exchange":
[root at plxweb01 rabbitmq]#
[root at plxweb01 rabbitmq]# /usr/local/bin/amqp-consume  --server="plxweb01"
--vhost="testvhost" --username="testuser" --password="testuser123"
--exchange="" cat
Server provided queue name: amq.gen-+griWnCcj8DyRPBHX5eiDQ==
queue.bind: server channel error 403, message: ACCESS_REFUSED - operation
not permitted on the default exchange
[root at plxweb01 rabbitmq]#


Any help would be much appreciated!!!

Thanks
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110412/b4e72066/attachment.html>


More information about the rabbitmq-discuss mailing list