Rabbitmq 3

[ Rabbitmq ] 서버에서 클라이언트로 hello world 보내기

서버 Rabbitmq 서버에 연결은 만든다 채널을 만든다. 채널이 생성되어 있는동안 큐를 선언해서 메시지를 클라이언트로 보낸다 using RabbitMQ.Client; using System; using System.Text; namespace RabbitmqServer { class Program { static void Main(string[] args) { var factory = new ConnectionFactory() { HostName = "localhost" };//ip using (var connection = factory.CreateConnection()) using (var channel = connection.CreateModel()) { channel.QueueDeclare(qu..

Rabbitmq 2022.12.27

[ Rabbitmq ] Rabbitmq 통신: c# 과 파이썬 이용해서 rabbitmq publish , consume

c# easynetq : publish , python pika : consume 1. pika consume credentials = pika.PlainCredentials('id','pw') # create connection connection = pika.BlockingConnection( pika.ConnectionParameters(host=ip, virtual_host='/', credentials=credentials)) # create channel channel = connection.channel() # declare queue result = channel.queue_declare(queue='MqttTestQueue', exclusive=True) queue_name = resul..

Rabbitmq 2022.09.04