[rabbitmq-discuss] .net version of the subscriber

jdepp j_depp_99 at yahoo.com
Tue Jan 22 18:43:40 GMT 2013


I am trying to interprate the following and convert into .net code to
implement creating multiple consumers and have them subscribe to a queue.

def callback(ch, method, properties, body):
    print " [x] Received %r" % (body,)
    time.sleep( body.count('.') )
    print " [x] Done"
    ch.basic_ack(delivery_tag = method.delivery_tag)

channel.basic_qos(prefetch_count=1)
channel.basic_consume(callback,
                      queue='task_queue')

channel.start_consuming()


what is the callback method? Is that the function that is called and how is
this faster than using a basicget within your own loop. It is still one
consumer to a queue right or does rabbit implement its own threading
somehow.



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/net-version-of-the-subscriber-tp24625.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list