<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">For some reason I can't get this example to work:<div><br></div><div><span style="font-family: 'Times New Roman'; background-color: rgb(255, 255, 255); font-size: medium; "><pre style="white-space: pre-wrap; ">
[sender]
var sys = require('sys');
var amqp = require('./amqp');
var connection = amqp.createConnection({ host: 'localhost' });
// Wait for connection to become established.
connection.addListener('ready', function () {
var x = connection.exchange()
var q = connection.queue("aqueuename",
{ autoDelete: true, durable: false, exclusive: false });
x.publish('aqueuename', {foo: "bar"});
});
[receiver]
#!/usr/bin/env python
import pika
connection = pika.AsyncoreConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
q = channel.queue_declare(queue='aqueuename',
auto_delete=True,
durable=False,
exclusive=False)
print ' [*] Waiting for messages. To exit press CTRL+C'
def callback(ch, method, properties, body):
print " [x] Received %r" % (body,)
channel.basic_consume(callback,
queue='aqueuename',
no_ack=True)
pika.asyncore_loop()</pre><pre style="white-space: pre-wrap; "><br></pre><pre style="white-space: pre-wrap; ">I wanted to used a BlockingConnection. Do you know if this works with a BlockingConnection?</pre><pre style="white-space: pre-wrap; ">
<br></pre><pre style="white-space: pre-wrap; ">Thanks</pre><pre style="white-space: pre-wrap; ">Ricardo</pre></span></div></span><div><br></div>-- <br>Ricardo Brízido<br>