{"id":26327351,"url":"https://github.com/yunussandikci/dbqueue-go","last_synced_at":"2026-01-12T00:03:03.599Z","repository":{"id":196357032,"uuid":"695809216","full_name":"yunussandikci/dbqueue-go","owner":"yunussandikci","description":"Database based FIFO queue implementation with the support of Deduplication, Priority and VisibilityTimeout in Go","archived":false,"fork":false,"pushed_at":"2024-08-25T17:48:31.000Z","size":83,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T10:44:59.198Z","etag":null,"topics":["go","golang","hacktoberfest","hacktoberfest2023","message-queues","mysql","postgresql","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Go","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/yunussandikci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-09-24T09:44:37.000Z","updated_at":"2025-04-29T12:08:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"636db49d-96de-4d29-8a9b-1198991f0646","html_url":"https://github.com/yunussandikci/dbqueue-go","commit_stats":null,"previous_names":["yunussandikci/squeuelite-go"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/yunussandikci/dbqueue-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunussandikci%2Fdbqueue-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunussandikci%2Fdbqueue-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunussandikci%2Fdbqueue-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunussandikci%2Fdbqueue-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunussandikci","download_url":"https://codeload.github.com/yunussandikci/dbqueue-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunussandikci%2Fdbqueue-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28328699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"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":["go","golang","hacktoberfest","hacktoberfest2023","message-queues","mysql","postgresql","sqlite"],"created_at":"2025-03-15T20:18:35.536Z","updated_at":"2026-01-12T00:03:03.583Z","avatar_url":"https://github.com/yunussandikci.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# DBQueue-Go\n\nDBQueue-Go is a simple, lightweight queue system based on various SQL databases, implemented in Go. It supports MySQL, PostgreSQL, and SQLite, allowing for easy integration with existing database infrastructures.\n\n## 🚀 Getting Started\n\nTo start using DBQueue-Go, simply run the following command in your terminal:\n\n```bash\ngo get github.com/yunussandikci/dbqueue-go\n```\n\nThen, import the `dbqueue` package in your Go file:\n\n```go\nimport \"github.com/yunussandikci/dbqueue-go/dbqueue\"\n```\n\n## 🎉 Usage\n\n### Opening a Database Connection\n\nTo work with DBQueue-Go, you need to open a connection to your preferred SQL database engine:\n\n```go\npostgresqlEngine, _ := dbqueue.OpenPostgreSQL(ctx, \"host=localhost user=foo password=bar dbname=baz port=5432 sslmode=disable\")\nmysqlEngine, _ := dbqueue.OpenMySQL(ctx, \"foo:bar@tcp(127.0.0.1:3306)/baz\")\nsqliteEngine, _ := dbqueue.OpenSQLite(ctx, \"foo.db\")\n```\n\n### Creating a Queue\n\nCreate a new queue using the engine:\n\n```go\nqueue, _ := postgresqlEngine.CreateQueue(ctx, \"my_queue\")\n```\n\n### Sending Messages\n\nTo send a message to the queue:\n\n```go\n_ = queue.SendMessage(ctx, \u0026types.Message{\n    Payload:  []byte(\"Hello, world!\"),\n    Priority: 1,\n})\n```\n\n### Sending Messages in Batch\n\nYou can also send multiple messages at once:\n\n```go\n_ = queue.SendMessageBatch(ctx, []*types.Message{\n    {Payload: []byte(\"Message 1\"), Priority: 1},\n    {Payload: []byte(\"Message 2\"), Priority: 1},\n})\n```\n\n### Receiving Messages\n\nReceive messages from the queue:\n\n```go\n_ = queue.ReceiveMessage(ctx, func(message types.ReceivedMessage) {\n    fmt.Println(\"Received message:\", string(message.Payload))\n}, \u0026types.ReceiveMessageOptions{\n    MaxNumberOfMessages: common.Ptr(10),\n    VisibilityTimeout:   common.Ptr(30 * time.Second),\n    WaitTime:            common.Ptr(5 * time.Second),\n})\n```\n\n### Deleting Messages\n\nDelete a specific message from the queue:\n\n```go\n_ = queue.DeleteMessage(ctx, messageID)\n```\n\nYou can also delete multiple messages at once:\n\n```go\n_ = queue.DeleteMessageBatch(ctx, []uint{messageID1, messageID2})\n```\n\n### Changing Message Visibility\n\nChange the visibility timeout of a message:\n\n```go\n_ = queue.ChangeMessageVisibility(ctx, messageID, time.Minute*5)\n```\n\nThis can also be done in batch:\n\n```go\n_ = queue.ChangeMessageVisibilityBatch(ctx, []uint{messageID1, messageID2}, time.Minute*5)\n```\n\n### Deleting a Queue\n\nDelete a queue if it is no longer needed:\n\n```go\n_ = engineInstance.DeleteQueue(ctx, \"my_queue\")\n```\n\n### Purging a Queue\n\nPurge all messages from a queue:\n\n```go\n_ = engineInstance.PurgeQueue(ctx, \"my_queue\")\n```\n\n## 🤝 Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n### Issues\n\nIf you encounter any bugs or have suggestions for improvements, please feel free to [open an issue](https://github.com/yunussandikci/dbqueue-go/issues). Your feedback is invaluable and helps us improve the project.\n\n### Pull Requests\n\nWe welcome pull requests for new features, bug fixes, or documentation improvements. Here’s how you can contribute:\n\n## 📜 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunussandikci%2Fdbqueue-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunussandikci%2Fdbqueue-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunussandikci%2Fdbqueue-go/lists"}