Kyungbeom Jin · Aug 6, 2025 go to post

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.

Kyungbeom Jin · Aug 6, 2025 go to post

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);
    }
}

Kyungbeom Jin · Aug 6, 2025 go to post

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.

Kyungbeom Jin · Aug 6, 2025 go to post

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

Kyungbeom Jin · Aug 6, 2025 go to post

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.