[rabbitmq-discuss] help to begin with amqp

daniel jeem daniel.jeem at gmail.com
Mon Dec 1 14:21:00 GMT 2008


I have found  this document and I want to follow it:
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/pdf/Messaging_Tutorial/Messaging_Tutorial.pdf

but I have a problm whith this basic exapmle:

import qpid
import sys
import os
from qpid.util import connect
from qpid.connection import Connection
from qpid.datatypes import Message, RangedSet, uuid4
from qpid.queue import Empty
# additional imports for a given example go here
#----- Functions and Classes ----------------------------
# Any functions and classes needed for a given example
# go here.
#----- Initialization -----------------------------------
#  Set parameters for login
host="127.0.0.1"
port=5672

user="guest"
password="guest"
# Create a connection and a session. The constructor for a session
# requires a UUID to uniquely identify the session.
socket = connect(host, port)
connection = Connection (sock=socket)
connection.start()
session = connection.session(str(uuid4()))
#----- Main Body of Program --------------------------------
#   Main body of each example goes here
#----- Cleanup ---------------------------------------------
# Close the session before exiting so there are no open threads.
session.close(timeout=10)



When I run it, that is what I see:
connection = Connection (sock=socket)
  File "/usr/lib/python2.5/site-packages/qpid/connection.py", line 52, in
__init__
    spec = load(default())
  File "/usr/lib/python2.5/site-packages/qpid/spec.py", line 43, in default
    raise Exception("unable to locate the amqp specification, please set "
Exception: unable to locate the amqp specification, please set the AMQP_SPEC
environment variable or supply qpid_config.py on the PYTHONPATH


I haven't understand were is the problem, may be in the version of my qpid.
I tried différent version.

Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20081201/35740709/attachment.htm 


More information about the rabbitmq-discuss mailing list