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.
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);
}
}
https://community.intersystems.com/post/how-do-i-use-rabbitmq#comment-28...