[rabbitmq-discuss] How to specify user/pass

eleanor evangeline.eleanor at gmail.com
Mon Jul 2 05:45:47 BST 2012


Hi,

is there a tutorial somewhere which specifies how we can login to the
rabbitmq which uses internal database and LDAP database. 

The example from the tutorial is the following code:

#!/usr/bin/env python
import pika
import sys

connection = pika.BlockingConnection(pika.ConnectionParameters(
        host='10.1.1.176'))
channel = connection.channel()

channel.queue_declare(queue='logs', durable=True)

message = ' '.join(sys.argv[1:]) or "Hello World!"
channel.basic_publish(exchange='',
                      routing_key='logs',
                      body=message,
                      properties=pika.BasicProperties(
                         delivery_mode = 2, # make message persistent
                      ))
print " [x] Sent %r" % (message,)
connection.close()


How can I change that to also login with the user/pass to the rabbitmq. A
link to the tutorial would be great. Sorry for the noob question, but I'm
really just starting out with rabbitmq.

Thanks

--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/How-to-specify-user-pass-tp20479.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list