{"id":24791580,"url":"https://github.com/sofyan48/gempi","last_synced_at":"2026-05-16T18:08:50.943Z","repository":{"id":72495014,"uuid":"228665350","full_name":"sofyan48/gempi","owner":"sofyan48","description":"Pubs/Subs model with AWS sqs","archived":false,"fork":false,"pushed_at":"2019-12-22T17:31:44.000Z","size":64,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-31T23:47:57.985Z","etag":null,"topics":["aws","consumer","gempi","producer","pubsub","sqs"],"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/sofyan48.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-17T17:13:07.000Z","updated_at":"2025-07-11T14:30:52.000Z","dependencies_parsed_at":"2023-03-11T13:25:23.736Z","dependency_job_id":null,"html_url":"https://github.com/sofyan48/gempi","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sofyan48/gempi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofyan48%2Fgempi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofyan48%2Fgempi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofyan48%2Fgempi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofyan48%2Fgempi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sofyan48","download_url":"https://codeload.github.com/sofyan48/gempi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofyan48%2Fgempi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33113509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"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":["aws","consumer","gempi","producer","pubsub","sqs"],"created_at":"2025-01-29T19:17:25.831Z","updated_at":"2026-05-16T18:08:50.937Z","avatar_url":"https://github.com/sofyan48.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GEMPI\nImplementing Publisher and Consumer with SQS\n## Getting Started\n\n### Installing\n```\ngo get github.com/sofyan48/gempi\n```\n### Getting Client\n```golang\n// configure aws creds\ncfg := config.Configure()\ncfg.PathURL = os.Getenv(\"SQS_URL\")\ncfg.AwsAccessKeyID = os.Getenv(\"ACCESS_KEY\")\ncfg.AwsSecretAccessKey = os.Getenv(\"SECRET_KEY\")\ncfg.APArea = \"ap-southeast-1\"\ncfg.Backend = \"backend\"\ncfg.Broker = \"broker\"\n// get sqs client\nclient := config.NewConfig().Credential(cfg).New()\n```\n\n### Starting Worker\nBefore carrying out road activities, start the worker first\n```golang\n// Create Worker\nworker := api.NewWorker(client)\n// worker.SetWorker()\nworker.Start()\n```\n\n### Producer\n\n```golang\n// create sqs Producer\nproducer := api.NewProducer(client)\n// Publish Messages\nmessage := producer.GetMessageInput()\nmessage.Topic = \"send1\"\nmessage.Status = \"progres\"\nmessage.Body = \"dataBody\"\nmessage.Parameter = \"dataParams\"\nresult, err := producer.Send(message)\nif err != nil {\n\tfmt.Println(\"ERROR : \", err)\n}\nfmt.Println(\"Messages Sending : \", result)\n```\n### Consumer\n***Callback***\n```golang\nfunc callback(context *entity.Context, client *entity.NewClient) {\n\tcb := api.GetCallbackFunction()\n\tobj := \u0026entity.StateFullModels{}\n\tjson.Unmarshal([]byte(*context.Message.Body), \u0026obj)\n\tfmt.Println(\"Message Raw From Context\", obj)\n\t// cb.Flush(client, context.Message, context.Data)\n\tcb.Deleted(client, context.Message)\n}\n```\nnow get consume\n```golang\n// Create Consumer\nconsumer := api.NewConsumer(client)\n// consumer get data with callback\nconsumer.Consumer(\"send1\", callbackData, 1)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofyan48%2Fgempi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsofyan48%2Fgempi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofyan48%2Fgempi/lists"}