{"id":26155460,"url":"https://github.com/ntdls/catmq","last_synced_at":"2026-05-08T06:20:48.296Z","repository":{"id":269928003,"uuid":"908878758","full_name":"NTDLS/CatMQ","owner":"NTDLS","description":"A high-performance and reliable persistent message queue designed for efficient inter-process communication, task queuing, load balancing, and data buffering over TCP/IP.","archived":false,"fork":false,"pushed_at":"2026-03-19T04:30:18.000Z","size":2489,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-19T05:55:37.288Z","etag":null,"topics":["ipc","load-balancing","message-queue","queuing"],"latest_commit_sha":null,"homepage":"https://www.networkdls.com/Entity/CatMQ","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NTDLS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-27T07:29:33.000Z","updated_at":"2026-03-19T04:30:12.000Z","dependencies_parsed_at":"2025-01-13T05:19:19.899Z","dependency_job_id":"137af89b-25d9-4437-8efe-c4a7479e30ed","html_url":"https://github.com/NTDLS/CatMQ","commit_stats":null,"previous_names":["ntdls/prudentmessagequeue","ntdls/catmq"],"tags_count":58,"template":false,"template_full_name":null,"purl":"pkg:github/NTDLS/CatMQ","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTDLS%2FCatMQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTDLS%2FCatMQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTDLS%2FCatMQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTDLS%2FCatMQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NTDLS","download_url":"https://codeload.github.com/NTDLS/CatMQ/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NTDLS%2FCatMQ/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ipc","load-balancing","message-queue","queuing"],"created_at":"2025-03-11T08:56:17.893Z","updated_at":"2026-04-01T17:36:46.381Z","avatar_url":"https://github.com/NTDLS.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CatMQ\nCatMQ is a high-performance and reliable persistent message queue designed for efficient inter-process communication, task queuing, load balancing, and data buffering over TCP/IP.\n\n## Testing Status\n[![Regression Tests](https://github.com/NTDLS/CatMQ/actions/workflows/Regression%20Tests.yml/badge.svg)](https://github.com/NTDLS/CatMQ/actions/workflows/Regression%20Tests.yml)\n\n## Another Message Queue?! Why?\nCatMQ is not “fully featured”, as in it does not natively support clustering, it is not multi-protocol (no AMQP nor MQTT), and it is not friendly to non-dot-net subscribers.\nOk, then what’s the deal?\nWell, we needed a MQ that was slim, straight forward and free of fat-runtimes such as java or additional dependencies such as erlang. We went on an internet fishing expedition and came up empty.\n\nSo, we built one. __Welcome to CatMQ: a reliable yet slim message queue.__\n\n## Packages 📦\n- Server Nuget package: https://www.nuget.org/packages/NTDLS.CatMQ.Server\n- Client Nuget package: https://www.nuget.org/packages/NTDLS.CatMQ.Client\n- Dedicated server install and web UI: https://github.com/NTDLS/CatMQ/releases\n\n## See also:\n - https://github.com/NTDLS/KitKey\n - https://github.com/NTDLS/NTDLS.ReliableMessaging\n\n## Management UI\n\u003cimg width=\"1465\" height=\"1021\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ede6ca47-c6e5-4240-b5d1-d654e5b7b17d\" /\u003e\n\n## Server\nRunning the server is as simple as downloading and installing the [dedicated CatMQ Service](https://github.com/NTDLS/CatMQ/releases), which is a platform independent service that includes a web management interface.\n\nAlternatively, the server can be run in-process using the nuget package NTDLS.CatMQ.Server.\nRunning the server in-process is simple and configurable. The server process does not have to be dedicated as it can also be one of the processes that is involved in inner-process-communication.\n\n```csharp\ninternal class Program\n{\n    static void Main()\n    {\n        var server = new CMqServer();\n\n        //Listen for queue clients on port 45784\n        server.StartAsync(45784);\n\n        Console.WriteLine(\"Press [enter] to shutdown.\");\n        Console.ReadLine();\n\n        server.Stop();\n    }\n}\n```\n\n## Client\n\nWith the client, we can interact with the server. Create/delete/purge queues, subscribe\nand of course send and receive messages. Messages are sent by simply passing a serializable\nclass instance that inherits ICMqMessage.\n\n\n```csharp\ninternal class MyMessage(string text) : ICMqMessage\n{\n    public string Text { get; set; } = text;\n}\n\nstatic void Main()\n{\n    var client = new CMqClient(); //Create an instance of the client.\n    client.Connect(\"127.0.0.1\", 45784); //Connect to the queue server.\n    client.OnReceived += Client_OnReceived; //Wire up an event to listen for messages.\n\n    //Create a queue. These are highly configurable.\n    client.CreateQueue(new CMqQueueConfiguration(\"MyFirstQueue\")\n    {\n        Persistence = PMqPersistence.Ephemeral\n    });\n\n    //Subscribe to the queue we just created.\n    client.Subscribe(\"MyFirstQueue\", OnMessageReceived);\n\n    //Enqueue a few messages, note that the message is just a class and it must inherit from ICMqMessage.\n    for (int i = 0; i \u003c 10; i++)\n    {\n        client.Enqueue(\"MyFirstQueue\", new MyMessage($\"Test message {i++:n0}\"));\n    }\n\n    Console.WriteLine(\"Press [enter] to shutdown.\");\n    Console.ReadLine();\n\n    //Cleanup.\n    client.Disconnect();\n}\n\nprivate static CMqConsumeResult OnMessageReceived(CMqClient client, CMqReceivedMessage rawMessage)\n{\n    var message = rawMessage.Deserialize();\n\n    //Here we receive the messages for the queue(s) we are subscribed to\n    //  and we can use pattern matching to determine what message was received.\n    if (message is MyMessage myMessage)\n    {\n        Console.WriteLine($\"Received: '{myMessage.Text}'\");\n    }\n    else\n    {\n        Console.WriteLine($\"Received unknown message type.\");\n    }\n    return new CMqConsumeResult(CMqConsumptionDisposition.Consumed);\n}\n```\n\n\n## Web API\nWhen enabled, CatMQ also allows managing queues by the way of Web API, you'll first need to login to the web management UI, create a user and generate a API key. This API key will need to be passed in the \"x-catmq-api-Key\" header value.\n\n**Currently supported WebAPI calls**\n- `Enqueue/{queueName}/{objectType}` [json in body]\n- `CreateQueue/{queueName}`\n- `CreateQueue` [CMqQueueConfiguration json in body]\n- `Purge/{queueName}`\n- `DeleteQueue/{queueName}`\n\n### Example creating a queue using default settings with WebAPI via cURL\n**URL:** */api/CreateQueue/{queueName}*\n```\ncurl --location --request POST 'http://127.0.0.1:45783/api/CreateQueue/MyDefault' \\\n--header 'x-catmq-api-Key: kk4IajpGUJHMR1dFlzXmvnt0VlvGhp'\n```\n\n### Example creating a queue using custom settings with WebAPI via cURL\n**URL:** */api/CreateQueue/{queueName}*\n```\ncurl --location 'http://127.0.0.1:45783/api/CreateQueue' \\\n--header 'x-catmq-api-Key: kk4IajpGUJHMR1dFlzXmvnt0VlvGhp' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"QueueName\": \"MyQueue\",\n    \"BatchDeliveryInterval\": \"00:00:00\",\n    \"DeliveryThrottle\": \"00:00:00\",\n    \"MaxDeliveryAttempts\": 5,\n    \"MaxMessageAge\": \"01:00:00\",\n    \"ConsumptionScheme\": \"Delivered\",\n    \"DeliveryScheme\": \"Random\",\n    \"PersistenceScheme\": \"Persistent\"\n}'\n```\n\n### Example enqueuing a message with WebAPI via cURL\n**URL:** */api/Enqueue/{queueName}/{assemblyQualifiedTypeName}*\n```\ncurl --location 'http://127.0.0.1:45783/api/Enqueue/MyFirstQueue/Test.QueueClient.Program%2BMyMessage%2C%20Test.QueueClient' \\\n--header 'x-catmq-api-Key: kk4IajpGUJHMR1dFlzXmvnt0VlvGhp' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"Text\": \"This is a test message\"\n}'\n```\n\n## Notes about Assembly Qualified Type names\nMessages are automatically deserialized by the QueueClient, so its necessary to provide the fully assembly qualified type name when enqueuing a message.\n\n**Assembly Qualified Type Name format:**\n- Test.QueueClient.MyMessage, Test.QueueClient\n- Explanation: {ClassName}, {AssemblyName}\n\n**Assembly Qualified Type Name format for nested classes:**\n- Test.QueueClient.Program+MyMessage, Test.QueueClient\n- Explanation: {EnclosingClass}+{Class}, {AssemblyName}\n\n## Technologies\nCatMQ is based heavily on internally built technologies that leverage the works by people\nmuch smarter than me. Eternally grateful to all those for making my development a walk in the park.\n\n- Light-weight thread scheduling with sub-pooling: [NTDLS.DelegateThreadPooling](https://github.com/NTDLS/NTDLS.DelegateThreadPooling).\n- Nullabily and formatting: [NTDLS.Helpers](https://github.com/NTDLS/NTDLS.Helpers).\n- Based heavily on the standalone in-memory message queue: [NTDLS.MemoryQueue](https://github.com/NTDLS/NTDLS.MemoryQueue).\n- Round-trip messaging with compression, encryption, checksum and reliability notifications: [NTDLS.ReliableMessaging](https://github.com/NTDLS/NTDLS.ReliableMessaging).\n- Stream framing for packets reconstruction and fragmentation: [NTDLS.StreamFraming](https://github.com/NTDLS/NTDLS.StreamFraming).\n- Resource protection and concurrency because threads like to bite: [NTDLS.Semaphore](https://github.com/NTDLS/NTDLS.Semaphore)\n- Polymorphic deserialization provided by [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) because Microsoft refused to add it for \"reasons\".\n- Mega-tight communication enabled by [protobuf-net](https://github.com/protobuf-net/protobuf-net).\n- Message persistence provided by [rocksdb-sharp](https://github.com/curiosity-ai/rocksdb-sharp).\n- Logging, because otherwise we'd be blind: [serilog](https://github.com/serilog/serilog).\n- Windows service magic: [Topshelf](https://github.com/Topshelf/Topshelf).\n\n## Screenshots\n\n### Home view\n__(yes, that's over 1-billion messages).__ 👀\n\n![image](https://github.com/user-attachments/assets/48ed2204-0efa-4ee0-8b8a-50f557f74d24)\n\n### Newer Home Screen\n\u003cimg width=\"1327\" height=\"984\" alt=\"image\" src=\"https://github.com/user-attachments/assets/42a8df05-066e-471f-ac6e-d426c4ef23e0\" /\u003e\n\n### Queue view\n\u003cimg width=\"1323\" height=\"897\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2e2ce6b8-f669-4e00-844a-5eb5b5e79e47\" /\u003e\n\n### Messages view\n![image](https://github.com/user-attachments/assets/5782e58e-66f7-4f7b-9d2e-8098cb02e616)\n\n### Message view\n![image](https://github.com/user-attachments/assets/4c61a930-4ecb-48cb-aa90-c7bd528c7ae8)\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntdls%2Fcatmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntdls%2Fcatmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntdls%2Fcatmq/lists"}