{"id":13640861,"url":"https://github.com/zio/zio-sqs","last_synced_at":"2025-04-05T14:05:10.759Z","repository":{"id":41883634,"uuid":"184395036","full_name":"zio/zio-sqs","owner":"zio","description":"ZIO-powered client for AWS SQS","archived":false,"fork":false,"pushed_at":"2025-03-23T13:25:36.000Z","size":547,"stargazers_count":84,"open_issues_count":1,"forks_count":27,"subscribers_count":4,"default_branch":"series/2.x","last_synced_at":"2025-03-29T13:06:23.123Z","etag":null,"topics":["aws-sdk","connector","functional-programming","scala","sqs","stream","zio"],"latest_commit_sha":null,"homepage":"https://zio.dev/zio-sqs","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-01T09:30:45.000Z","updated_at":"2025-03-23T13:22:32.000Z","dependencies_parsed_at":"2024-05-20T21:15:57.388Z","dependency_job_id":"2908c370-927a-4d09-93c6-0afa9ed934f5","html_url":"https://github.com/zio/zio-sqs","commit_stats":{"total_commits":613,"total_committers":25,"mean_commits":24.52,"dds":"0.17292006525285486","last_synced_commit":"d84cc621b423a16293fe5872252dcaacd9318700"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-sqs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-sqs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-sqs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-sqs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zio","download_url":"https://codeload.github.com/zio/zio-sqs/tar.gz/refs/heads/series/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345850,"owners_count":20924102,"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":["aws-sdk","connector","functional-programming","scala","sqs","stream","zio"],"created_at":"2024-08-02T01:01:15.142Z","updated_at":"2025-04-05T14:05:10.739Z","avatar_url":"https://github.com/zio.png","language":"Scala","funding_links":[],"categories":["Scala","Official ZIO Libraries"],"sub_categories":[],"readme":"[//]: # (This file was autogenerated using `zio-sbt-website` plugin via `sbt generateReadme` command.)\n[//]: # (So please do not edit it manually. Instead, change \"docs/index.md\" file or sbt setting keys)\n[//]: # (e.g. \"readmeDocumentation\" and \"readmeSupport\".)\n\n# ZIO SQS\n\n[ZIO SQS](https://zio.dev/zio-sqs) is a ZIO-powered client for AWS SQS. It is built on top of the [AWS SDK for Java 2.0](https://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/basics.html) via the automatically generated wrappers from [zio-aws](https://zio.dev/zio-aws).\n\n[![Production Ready](https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](https://github.com/zio/zio-sqs/workflows/CI/badge.svg) [![Sonatype Releases](https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-sqs_2.13.svg?label=Sonatype%20Release)](https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-sqs_2.13/) [![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-sqs_2.13.svg?label=Sonatype%20Snapshot)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-sqs_2.13/) [![javadoc](https://javadoc.io/badge2/dev.zio/zio-sqs-docs_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/zio-sqs-docs_2.13) [![ZIO SQS](https://img.shields.io/github/stars/zio/zio-sqs?style=social)](https://github.com/zio/zio-sqs)\n\n## Introduction\n\nZIO SQS enables us to produce and consume elements to/from the Amazon SQS service. It is integrated with ZIO Streams, so we can produce and consume elements in a streaming fashion, element by element or micro-batching.\n\n## Installation\n\nIn order to use this library, we need to add the following line in our `build.sbt` file:\n\n```scala\nlibraryDependencies += \"dev.zio\" %% \"zio-sqs\" % \"0.7.3\"\n```\n\n## Example\n\nIn this example we produce a stream of events to the `MyQueue` and then consume them from that queue (at-most-once delivery semantics):\n\n```scala\nimport zio._\nimport zio.aws.core.config.AwsConfig\nimport zio.aws.netty.NettyHttpClient\nimport zio.aws.sqs.Sqs\nimport zio.sqs.producer.{Producer, ProducerEvent}\nimport zio.sqs.serialization.Serializer\nimport zio.sqs.{SqsStream, SqsStreamSettings, Utils}\nimport zio.stream.ZStream\n\nobject ProducerConsumerExample extends ZIOAppDefault {\n  val queueName = \"MyQueue\"\n\n  val stream: ZStream[Any, Nothing, ProducerEvent[String]] =\n    ZStream.iterate(0)(_ + 1).map(_.toString).map(ProducerEvent(_))\n\n  val program: ZIO[Sqs, Throwable, Unit] = for {\n    _        \u003c- Utils.createQueue(queueName)\n    queueUrl \u003c- Utils.getQueueUrl(queueName)\n    producer  = Producer.make(queueUrl, Serializer.serializeString)\n    _        \u003c- ZIO.scoped(producer.flatMap(_.sendStream(stream).runDrain))\n    _        \u003c- SqsStream(\n                  queueUrl,\n                  SqsStreamSettings.default\n                    .withAutoDelete(true)\n                    .withStopWhenQueueEmpty(true)\n                    .withWaitTimeSeconds(3)\n                ).foreach(msg =\u003e Console.printLine(msg.body))\n  } yield ()\n\n  def run =\n    program.provide(\n      Sqs.live,\n      AwsConfig.default,\n      NettyHttpClient.default\n    )\n}\n```\n\nCheck out the examples folder in `zio-sqs/src/test/scala/examples` for additional examples that cover at-least-once and at-most-once delivery semantics.\n\n## Documentation\n\nLearn more on the [ZIO SQS homepage](https://zio.dev/zio-sqs)!\n\n## Contributing\n\nFor the general guidelines, see ZIO [contributor's guide](https://zio.dev/contributor-guidelines).\n\n## Code of Conduct\n\nSee the [Code of Conduct](https://zio.dev/code-of-conduct)\n\n## Support\n\nCome chat with us on [![Badge-Discord]][Link-Discord].\n\n[Badge-Discord]: https://img.shields.io/discord/629491597070827530?logo=discord \"chat on discord\"\n[Link-Discord]: https://discord.gg/2ccFBr4 \"Discord\"\n\n## License\n\n[License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzio%2Fzio-sqs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzio%2Fzio-sqs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzio%2Fzio-sqs/lists"}