{"id":29523855,"url":"https://github.com/dmarzzucco/rabbitmqworkerconsumer","last_synced_at":"2025-07-16T18:04:11.879Z","repository":{"id":302108263,"uuid":"671177158","full_name":"DMarzzucco/RabbitMQWorkerConsumer","owner":"DMarzzucco","description":"RabbitMQWorkerConsumer","archived":false,"fork":false,"pushed_at":"2025-06-30T15:28:38.000Z","size":40774,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T16:36:30.622Z","etag":null,"topics":["consoleapplication","csharp","net","nuget-package","rabbitmq-consumer"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DMarzzucco.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}},"created_at":"2023-07-26T18:05:06.000Z","updated_at":"2025-06-30T15:28:41.000Z","dependencies_parsed_at":"2025-06-30T16:41:20.200Z","dependency_job_id":"313d1714-2aec-4581-8bda-7bf4170d9b1d","html_url":"https://github.com/DMarzzucco/RabbitMQWorkerConsumer","commit_stats":null,"previous_names":["dmarzzucco/rabbitmqworkerconsumer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DMarzzucco/RabbitMQWorkerConsumer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMarzzucco%2FRabbitMQWorkerConsumer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMarzzucco%2FRabbitMQWorkerConsumer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMarzzucco%2FRabbitMQWorkerConsumer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMarzzucco%2FRabbitMQWorkerConsumer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DMarzzucco","download_url":"https://codeload.github.com/DMarzzucco/RabbitMQWorkerConsumer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMarzzucco%2FRabbitMQWorkerConsumer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265528867,"owners_count":23782772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["consoleapplication","csharp","net","nuget-package","rabbitmq-consumer"],"created_at":"2025-07-16T18:02:03.750Z","updated_at":"2025-07-16T18:04:11.870Z","avatar_url":"https://github.com/DMarzzucco.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RabbitMQWorkerConsumer\n\n**RabbitMQWorkerConsumer** is a lightweight library designed to simplify the creation of message consumers in .NET applications using RabbitMQ.\n\nThis package encapsulates the logic for connecting, configuring, and consuming messages from a queue, allowing the developer to focus solely on defining the message and managing it through a simple interface.\n\nIt is specifically designed to avoid code repetition and facilitate the integration of RabbitMQ into your services, following good practices of asynchrony and decoupling.\n\n## ✅ Main Features:\n\n- Asynchronous connection to RabbitMQ using RabbitMQ.Client.\n- Automatic queue declaration.\n- Message consumption with explicit acknowledgment (acknowledgement).\n- Automatic deserialization of JSON messages.\n- `IMessageHandler\u003cT\u003e` interface for custom handling of each message type.\n\n## 🚀 Quick Use:\nYou just need to:\n\n- Define a message type (T).\n- Implement `MessageHandler\u003cT\u003e` to process it.\n- Provide the connection options (RabbitConnectionOptions).\n\n## Example in a Console App:\n```cs\nusing RabbitWorkerCore;\n\npublic class ClassMessage\n{\n    public required string Name { get; set; } = \"Ivan\";\n}\n\npublic class NameVerificationHandler : IMessageHandler\u003cClassMessage\u003e\n{\n    public Task HandleAsync(ClassMessage message)\n    {\n        Console.WriteLine($\"This is a message for {message.Name} \");\n        return Task.CompletedTask;\n    }\n}\n\nclass Program\n{\n    static async Task Main(string[] arg)\n    {\n        var options = new RabbitConnectionOptions\n        {\n            HostName = \"localhost\",\n            Port = 5672,\n            UserName = \"user\",\n            Password = \"password\",\n            QueueName = \"test-name\"\n        };\n        var handler = new NameVerificationHandler();\n        var worker = new WorkerConsumitor\u003cClassMessage\u003e(handler, options);\n\n        await worker.StartAsync();\n    }\n}\n```\n\n## Author:\n**Dario Marzzucco**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarzzucco%2Frabbitmqworkerconsumer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmarzzucco%2Frabbitmqworkerconsumer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarzzucco%2Frabbitmqworkerconsumer/lists"}