# @zio.dev/zio-sqs

> ZIO SQS Documentation

Latest version **0.12.7** (published 2026-11-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @zio.dev/zio-sqs
pnpm add @zio.dev/zio-sqs
yarn add @zio.dev/zio-sqs
bun add @zio.dev/zio-sqs
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.12.7 |
| Published | 2026-11-19 |
| First published | 2022-11-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 66.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 85 |
| Maintainers | zio.org |

## Links

- npm: https://www.npmjs.com/package/@zio.dev/zio-sqs
- Repository: https://github.com/zio/zio-sqs
- Homepage: https://github.com/zio/zio-sqs#readme
- Issues: https://github.com/zio/zio-sqs/issues
- npm.io page: https://npm.io/package/@zio.dev/zio-sqs

## Recent versions

- 0.12.7 (latest) — 2026-11-19
- 0.12.0 — 2025-12-08
- 0.11.1 — 2025-11-14
- 0.11.0 — 2025-11-05
- 0.10.0 — 2025-10-01
- 0.9.3 — 2025-08-28
- 0.9.2 — 2025-08-26
- 0.9.1 — 2025-08-26
- 0.9.0 — 2025-08-17
- 0.8.1 — 2025-06-09
- 0.8.0 — 2025-03-23
- 0.7.3 — 2025-03-15
- 0.7.2 — 2025-03-11
- 0.7.1 — 2025-01-21
- 0.7.0 — 2025-01-09
- … 7 more at https://npm.io/package/@zio.dev/zio-sqs/versions

## README

[//]: # (This file was autogenerated using `zio-sbt-website` plugin via `sbt generateReadme` command.)
[//]: # (So please do not edit it manually. Instead, change "docs/index.md" file or sbt setting keys)
[//]: # (e.g. "readmeDocumentation" and "readmeSupport".)

# ZIO SQS

[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).

[![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/maven-central/v/dev.zio/zio-sqs_2.13.svg?label=Sonatype%20Release)](https://central.sonatype.com/artifact/dev.zio/zio-sqs_2.13) [![Sonatype Snapshots](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Fcentral.sonatype.com%2Frepository%2Fmaven-snapshots%2Fdev%2Fzio%2Fzio-sqs_2.13%2Fmaven-metadata.xml&label=Sonatype%20Snapshot)](https://central.sonatype.com/repository/maven-snapshots/dev/zio/zio-sqs_2.13/) [![javadoc](https://javadoc.io/badge2/dev.zio/zio-sqs_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/zio-sqs_2.13) [![ZIO SQS](https://img.shields.io/github/stars/zio/zio-sqs?style=social)](https://github.com/zio/zio-sqs)

ZIO 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.

## Installation

ZIO SQS is published for Scala 2.13 and Scala 3 on the JVM only. To use it, we add the following to the `build.sbt` file:

```scala
libraryDependencies ++= Seq(
  // ZIO SQS client: producers, consumer streams and queue helpers (JVM only).
  // It brings the zio-aws SQS client and the Netty HTTP client as dependencies.
  "dev.zio" %% "zio-sqs" % "0.12.6"
)
```

## Example

In this example we produce a stream of ten events to the `MyQueue` and then consume them from that queue (at-most-once delivery semantics):

```scala
import zio._
import zio.aws.core.config.AwsConfig
import zio.aws.netty.NettyHttpClient
import zio.aws.sqs.Sqs
import zio.sqs.producer.{Producer, ProducerEvent}
import zio.sqs.serialization.Serializer
import zio.sqs.{SqsStream, SqsStreamSettings, Utils}
import zio.stream.ZStream

object ProducerConsumerExample extends ZIOAppDefault {
  val queueName = "MyQueue"

  val stream: ZStream[Any, Nothing, ProducerEvent[String]] =
    ZStream.iterate(0)(_ + 1).map(_.toString).map(ProducerEvent(_)).take(10)

  val program: ZIO[Sqs, Throwable, Unit] = for {
    _        <- Utils.createQueue(queueName)
    queueUrl <- Utils.getQueueUrl(queueName)
    producer  = Producer.make(queueUrl, Serializer.serializeString)
    _        <- ZIO.scoped(producer.flatMap(_.sendStream(stream).runDrain))
    _        <- SqsStream(
                  queueUrl,
                  SqsStreamSettings.default
                    .withAutoDelete(true) // at-most-once delivery semantics
                    .withStopWhenQueueEmpty(true)
                    .withWaitTimeSeconds(3)
                ).foreach(msg => Console.printLine(msg.body))
  } yield ()

  def run =
    program.provide(
      Sqs.live,
      AwsConfig.default,
      NettyHttpClient.default
    )
}
```

To learn the library step by step, start with [Getting Started](docs/./getting-started.md). The examples folder in `zio-sqs/src/test/scala/examples` has additional examples for at-least-once and at-most-once delivery semantics.

## Documentation

Learn more on the [ZIO SQS homepage](https://zio.dev/zio-sqs)!

## Contributing

For the general guidelines, see ZIO [contributor's guide](https://zio.dev/contributor-guidelines).

## Code of Conduct

See the [Code of Conduct](https://zio.dev/code-of-conduct)

## Support

Come chat with us on [![Badge-Discord]][Link-Discord].

[Badge-Discord]: https://img.shields.io/discord/629491597070827530?logo=discord "chat on discord"
[Link-Discord]: https://discord.gg/2ccFBr4 "Discord"

## License

[License](LICENSE)

---
_Source: https://npm.io/package/@zio.dev/zio-sqs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
