目前我只能在环回接口中捕获数据包,我在rabbitmq.conf中设置了tcp默认值,一切似乎都很好,但我相信pika.blockingconnection不允许我通过wireshark中的etho/epsn03接口捕获数据包和使用 ubuntu 20.04
链接到这里的代码。
请分享任何建议和解决方案。
# publish.py
import pika
credentials = pika.PlainCredentials('admin', 'admin')
params = pika.ConnectionParameters(host='192.168.0.0', port=5672, virtual_host='/',
credentials=credentials)
connection = pika.BlockingConnection(params)
channel = connection.channel() # start a channel
channel.exchange_declare('test-exchange')
channel.queue_declare(queue='hello') # Declare a queue
channel.basic_publish(exchange='test-exchnage',
routing_key='hello',
body='Hello AMQP!')
print(" [x] Sent 'Hello World!'")
connection.close()