go to post Kyungbeom Jin · Aug 6 https://community.intersystems.com/post/how-do-i-use-rabbitmq#comment-28...
go to post Kyungbeom Jin · Aug 6 Originally, C# was the consumer and Node.js was the producer. I forced a publish on RabbitMQ, and C# was able to receive. Node.js was able to send.
go to post Kyungbeom Jin · Aug 6 public static async Task Main(string[] args){ var factory = new ConnectionFactory { HostName = "localhost" }; var connection = await factory.CreateConnectionAsync(); var channel = await connection.CreateChannelAsync(); string queueName = "temperature"; await channel.QueueBindAsync(queueName, "temperature", "temperature.current"); var consumer = new AsyncEventingBasicConsumer(channel); consumer.ReceivedAsync += async (_, ea) => { var body = ea.Body.ToArray(); var message = Encoding.UTF8.GetString(body); Console.WriteLine($" [x] Received '{message}'"); }; channel.BasicConsumeAsync(queueName, true, consumer); while (true) { Task.Delay(100); }}
go to post Kyungbeom Jin · Aug 6 External.Messaging.RabbitMQSettings itself has an InitialExpression set, so no other settings are needed. When I checked the input data, all the necessary data was entered.
go to post Kyungbeom Jin · Aug 6 thank you but, Even if you copy only the production source code and run it locally, the result is the same. (Instead of using RabbitCreds, I created separate guest credentials.) iris - local rabbitmq - local
go to post Kyungbeom Jin · Aug 6 I'm using the rabbitmq server I installed earlier. I configured rabbitmq the same way as in the link. The username and password remain the same: guest/guest.