{"id":37123544,"url":"https://github.com/sunerpy/rabbitmqpool","last_synced_at":"2026-01-14T14:15:55.646Z","repository":{"id":211754318,"uuid":"729610960","full_name":"sunerpy/rabbitmqpool","owner":"sunerpy","description":"rabbitmqpool","archived":false,"fork":false,"pushed_at":"2024-06-25T08:03:47.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-26T09:28:58.810Z","etag":null,"topics":["rabbitmq-pool-golang"],"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/sunerpy.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":"2023-12-09T19:19:53.000Z","updated_at":"2024-06-25T08:03:42.000Z","dependencies_parsed_at":"2024-06-25T09:15:41.211Z","dependency_job_id":"20d5f066-ebf2-40e7-9635-547552f718b8","html_url":"https://github.com/sunerpy/rabbitmqpool","commit_stats":null,"previous_names":["sunerpy/rabbitmqpool"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sunerpy/rabbitmqpool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunerpy%2Frabbitmqpool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunerpy%2Frabbitmqpool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunerpy%2Frabbitmqpool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunerpy%2Frabbitmqpool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunerpy","download_url":"https://codeload.github.com/sunerpy/rabbitmqpool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunerpy%2Frabbitmqpool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28422453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["rabbitmq-pool-golang"],"created_at":"2026-01-14T14:15:53.710Z","updated_at":"2026-01-14T14:15:55.560Z","avatar_url":"https://github.com/sunerpy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### 用于rabbitmq的连接池\n\nfork自https://gitee.com/tym_hmm/rabbitmq-pool-go.git\n\n一边学习一边改\n\n1. 已实现功能：\n   * 使用function option为rabbitmq设置默认值\n2. 待实现功能：\n   * 消息发送失败时存入本地文件\n   * 捕获错误日志\n\n## 用法\n\n### 生产者\n\n```go\nimport (\n    \"github.com/sunerpy/rabbitmqpool\"\n    \"sync\"\n    \"os\"\n    \"fmt\"\n)\nfunc main(){\n    var instancePoolProducer *rabbitmqpool.RabbitPool\n    var testConf = rabbitmqpool.NewAmqpConf(\"192.1.1.210\", 5672, \"root\", \"root\", rabbitmqpool.WithRabbitType(1))\n\tvar wg sync.WaitGroup\n\tvar err error\n\tgo rabbitmqpool.TmpMain()\n\tlocalFile := \"localdata.txt\"\n\tinstancePoolProducer, err = rabbitmqpool.InitPool(testConf)\n\tif err != nil || instancePoolProducer == nil {\n\t\tfmt.Println(\"Here get pool failed...start save to file...\")\n\t\tos.Exit(1)\n\t}\n\tfor i := 0; i \u003c 5; i++ {\n\t\twg.Add(1)\n\t\tgo func(num int) {\n\t\t\tdefer wg.Done()\n\t\t\tdata := rabbitmqpool.GetRabbitMqDataFormat(\"testChange5\", rabbitmqpool.EXCHANGE_TYPE_TOPIC, \"textQueue5\", \"\", \"这里是数据\", localFile)\n\t\t\tdata.Data = fmt.Sprintf(\"update num is %v\", jsonData)\n\t\t\terr := instancePoolProducer.Push(data)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Printf(\"err is %v\", err)\n\t\t\t}\n\t\t}(i)\n\t}\n\twg.Wait()\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunerpy%2Frabbitmqpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunerpy%2Frabbitmqpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunerpy%2Frabbitmqpool/lists"}