{"id":26866337,"url":"https://github.com/jkone27/alicemq","last_synced_at":"2025-06-13T22:36:19.822Z","repository":{"id":54625869,"uuid":"49586895","full_name":"jkone27/AliceMQ","owner":"jkone27","description":"A reactive client library for RabbitMQ and Google PubSub, with observables, acknowledge and reject capabilities","archived":false,"fork":false,"pushed_at":"2024-03-14T09:22:54.000Z","size":640,"stargazers_count":5,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-07T05:47:39.118Z","etag":null,"topics":["alice","consumer","google-pubsub","messaging","messaging-library","queue","rabbitmq","rabbitmq-client"],"latest_commit_sha":null,"homepage":"","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/jkone27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-01-13T16:39:39.000Z","updated_at":"2024-03-14T09:22:58.000Z","dependencies_parsed_at":"2025-05-07T01:48:11.440Z","dependency_job_id":null,"html_url":"https://github.com/jkone27/AliceMQ","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jkone27/AliceMQ","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkone27%2FAliceMQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkone27%2FAliceMQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkone27%2FAliceMQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkone27%2FAliceMQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkone27","download_url":"https://codeload.github.com/jkone27/AliceMQ/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkone27%2FAliceMQ/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259730843,"owners_count":22902921,"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":["alice","consumer","google-pubsub","messaging","messaging-library","queue","rabbitmq","rabbitmq-client"],"created_at":"2025-03-31T04:54:18.898Z","updated_at":"2025-06-13T22:36:19.803Z","avatar_url":"https://github.com/jkone27.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Ceasefire Now](https://badge.techforpalestine.org/ceasefire-now)](https://techforpalestine.org/learn-more)\n[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)\n\n# AliceMQ [![NuGet Badge](https://buildstats.info/nuget/AliceMQ)](https://www.nuget.org/packages/AliceMQ)\n\n\u003cimg src=\"https://github.com/jkone27/AliceMQ/blob/master/Pics/Whiterabbit_tenniel.jpg?raw=true\" width=\"20%\" height=\"20%\"/\u003e\n\nA reactive client library with support for RabbitMq and experimental support for google pubsub (TBR), \nusing reactive extensions for .net\n\n## local environment setup\n\n\nfor rabbitmq:\n\n```docker\ndocker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management\n```\n\nor for the google pubsub version you can run an emulator like\n\n```docker\ndocker run --rm -ti -p 8681:8681 -e PUBSUB_PROJECT1=test-proj,topic1:subscription1 messagebird/gcloud-pubsub-emulator:latest     \n```\n\n\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/jkone27/AliceMQ/issues)\n\n## Mailman (Producer)\n\nUsage of a mailman is dead simple:\n\n```cs\nusing AliceMQ.Core.Message;\nusing AliceMQ.Core.Types;\nusing AliceMQ.Rabbit.MailBox; \nusing AliceMQ.Rabbit.Mailman; \n//for for g pubsub version: using AliceMQ.PubSub;\n//parameters are slightly different..\n\nvar source = new Source(\"A\", \"A.q\");\nvar endPoint = new EndPoint();\nvar sink = new Sink(source);\n\nvar serialization = new JsonSerializerSettings\n    {\n        MissingMemberHandling = MissingMemberHandling.Error\n    };\n\nvar p = new Mailman(endPoint, source.Exchange, s =\u003e JsonConvert.SerializeObject(s, serialization));\n\n//first message published creates exchange if non existent\np.PublishOne(new Msg(-1),\"\");\n```\n\nNow let's see the simplest form of consumer, which is just a thin layer from the real MQ system...\n\n## SimpleMailbox (Consumer of BasicDeliverEventArgs)\n\nConsumer subscription is identical for every type, giving an istance of an IObservable\u003cT\u003e (rx).\n\n```cs\nusing AliceMQ.Mailbox;\n\nvar mb = new SimpleMailbox(endPoint, sink);\n\nusing var d = mb.Subscribe(am =\u003e\n{\n    Console.WriteLine(\"A - \" + Encoding.UTF8.GetString(am.EventArgs.Body));\n    am.Channel.BasicAck(am.EventArgs.DeliveryTag, false);\n});\n\n```\n\n## Mailbox\\\u003cT\u003e (Consumer of T)\n\nlet's consider an example DTO class Msg, the typed consumer is build upon the common consumer, which is enhanced with message body deserialization into an istance of a generic T type.\n\n```cs\nvar sfm = new Mailbox\u003cMsg\u003e(endPoint, sink, s =\u003e JsonConvert.DeserializeObject\u003cMsg\u003e(s, serialization));\n\nusing var d = sfm.Subscribe(am =\u003e\n{\n    if (am.IsOk\u003cMsg\u003e())\n    {\n        var msg = am.AsOk\u003cMsg\u003e().Message;\n        Console.WriteLine(\"ok - \" + msg.Bla);\n        am.Confirm();\n    }\n    else\n    {\n        Console.WriteLine(\"error - \" + am.AsError().Ex.Message);\n        am.Reject();\n    }\n},\nex =\u003e Console.WriteLine(\"COMPLETE ERROR\"),\n() =\u003e Console.WriteLine(\"COMPLETE\"));\n```\n\n### Status\n[![Build Status](https://img.shields.io/travis/jkone27/AliceMQ.svg)](https://travis-ci.org/jkone27/AliceMQ)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkone27%2Falicemq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkone27%2Falicemq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkone27%2Falicemq/lists"}