User bio
404 bio not found
Member since
Posts:
Kyungbeom has not published any posts yet.
Replies:
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);
    }
}

Certifications & Credly badges:
Kyungbeom has no Certifications & Credly badges yet.
Followers:
Kyungbeom has no followers yet.
Following:
Kyungbeom has not followed anybody yet.