{"id":22245276,"url":"https://github.com/tjarkpr/mqttdistribnet","last_synced_at":"2026-05-03T19:34:03.734Z","repository":{"id":266150144,"uuid":"890078266","full_name":"tjarkpr/mqttdistribnet","owner":"tjarkpr","description":"🕸️ MqttDistribNet - A structured distribution network for amqp messaging","archived":false,"fork":false,"pushed_at":"2024-12-30T19:30:59.000Z","size":53,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-03-25T11:14:15.313Z","etag":null,"topics":["distribution-network","golang","mqtt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tjarkpr.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}},"created_at":"2024-11-18T00:01:06.000Z","updated_at":"2024-12-02T21:07:44.000Z","dependencies_parsed_at":"2024-12-02T21:39:16.502Z","dependency_job_id":null,"html_url":"https://github.com/tjarkpr/mqttdistribnet","commit_stats":null,"previous_names":["tjarkpr/mqttdistribnet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tjarkpr/mqttdistribnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjarkpr%2Fmqttdistribnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjarkpr%2Fmqttdistribnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjarkpr%2Fmqttdistribnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjarkpr%2Fmqttdistribnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tjarkpr","download_url":"https://codeload.github.com/tjarkpr/mqttdistribnet/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjarkpr%2Fmqttdistribnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32582780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":["distribution-network","golang","mqtt"],"created_at":"2024-12-03T05:12:23.710Z","updated_at":"2026-05-03T19:34:03.713Z","avatar_url":"https://github.com/tjarkpr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## *🕸️ MqttDistribNet* - A structured distribution network for amqp messaging\n\nThe MqttDistribNet module consist of two concepts, to ease the usage of amqp brokers:\n- **Dynamic Infrastructure Management**\u003cbr\u003e\n  To simplify the configuration of topics and queues and binding them in a logical path, \n  we introduced an \u003ccode\u003eIDistributionNetworkManager\u003c/code\u003e and \u003ccode\u003eIRemoteDistributionNetworkManager\u003c/code\u003e. \n  While the \u003ccode\u003eIDistributionNetworkManager\u003c/code\u003e is the infrastructure management server, the \u003ccode\u003eIRemoteDistributionNetworkManager\u003c/code\u003e \n  is used by the client to get information about the remote managed infrastructure.\n- **Simple Message Distribution**\u003cbr\u003e\n  Based on Request/Response and Publish/Subscribe Patterns we created \u003ccode\u003eHandler\u003c/code\u003e, \u003ccode\u003eConsumer\u003c/code\u003e and \u003ccode\u003eClients\u003c/code\u003e to easily \n  configure the wanted behaviour behind queues and reach them by their configured message type.\n\n### 1. Usage:\n```go\nimport (\n    mqttdistribnet \"github.com/tjarkpr/mqttdistribnet/pkg\"\n    amqp \"github.com/rabbitmq/amqp091-go\"\n)\n```\n#### 1.1. DistributionNetworkManager\n```go\nconnection, err := amqp.Dial(url)\nmanager, err    := mqttdistribnet.MakeIDistributionNetworkManager(connection, \"\u003cprefix\u003e\")\nlogs, err       := manager.Start(\u0026ctx)\n```\n#### 1.2. Distribution \u0026 Consumption\n```go\nconnection, err := amqp.Dial(url)\nremote, err     := mqttdistribnet.MakeIRemoteDistributionNetworkManager(connection, \"\u003cprefix\u003e\")\n```\n```go\nremote.Register(reflect.TypeFor[mqttdistribnet.Envelope[TestRequest]](), \"L1.L2.L3.L4.*\")\n```\n```go\nerr = mqttdistribnet.MakeRequestHandler[mqttdistribnet.Envelope[TestRequest], mqttdistribnet.Envelope[TestResponse]](\n    remote,\n    func(request mqttdistribnet.Envelope[TestRequest]) (mqttdistribnet.Envelope[TestResponse], error) {\n        t.Log(\"Request: \" + request.ToString())\n        return mqttdistribnet.Envelope[TestResponse]{\n            MessageId: uuid.New(),\n            Timestamp: time.Now(),\n            Payload:   TestResponse{TestResProperty: \"Test\"},\n    }, nil\n}, \u0026ctx)\n```\n```go\nrequest         := \u0026mqttdistribnet.Envelope[TestRequest]{\n    MessageId: uuid.New(),\n    Timestamp: time.Now(),\n    Payload:   TestRequest{TestReqProperty: \"Test\"},\n}\nclients, err    := mqttdistribnet.MakeRequestClient[mqttdistribnet.Envelope[TestRequest], mqttdistribnet.Envelope[TestResponse]](remote)\nresponse, err   := slices.Collect(maps.Values(clients))[0].Send(request)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjarkpr%2Fmqttdistribnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjarkpr%2Fmqttdistribnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjarkpr%2Fmqttdistribnet/lists"}