Skip to content

NTDLS.MemoryQueue Usage

An in-memory non-persistent message queue for IPC, queuing, load-balancing and buffering over TCP/IP.

Published Jul 25, 2026

NTDLS.MemoryQueue

What it is. An in-memory, non-persistent message queue that runs over TCP/IP. It is intended for inter-process communication, job queuing, load-balancing and buffering between services on a machine or network. Because the queue lives in memory, messages are fast but do not survive a restart - this is a work buffer, not durable storage.

When to reach for it. You need lightweight, high-throughput message passing between processes (or threads) without standing up RabbitMQ or Azure Service Bus. Skip it if you require guaranteed delivery or persistence across reboots; pair it with something durable if that matters.

Getting started

The server side is two lines. It can even run inside the same process as one of its clients:

static void Main()
{
    var server = new MqQueuingService();

    // Listen for queue clients on port 45784,
    // and for web UI requests on port 8080.
    server.StartAsync(45784, 8080);

    Console.WriteLine("Press [enter] to shutdown.");
    Console.ReadLine();

    server.StopAsync();
}

The first port is where queue clients connect; the second serves a small web UI so you can watch queues live. Client-side enqueue/dequeue examples are covered in the package's own documentation on NuGet.

NuGet: NTDLS.MemoryQueue

An unhandled error has occurred. Reload 🗙