Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffijoe/deltio
A Google Cloud Pub/Sub emulator alternative, written in Rust.
https://github.com/jeffijoe/deltio
emulator gcloud-pubsub gcp grpc pubsub-emulator rust
Last synced: 9 days ago
JSON representation
A Google Cloud Pub/Sub emulator alternative, written in Rust.
- Host: GitHub
- URL: https://github.com/jeffijoe/deltio
- Owner: jeffijoe
- License: mit
- Created: 2023-04-15T20:29:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-06T18:48:01.000Z (2 months ago)
- Last Synced: 2024-10-14T12:18:11.466Z (22 days ago)
- Topics: emulator, gcloud-pubsub, gcp, grpc, pubsub-emulator, rust
- Language: Rust
- Homepage:
- Size: 463 KB
- Stars: 19
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Deltio
A Google Cloud Pub/Sub emulator alternative for local development.
> ℹ️ **DISCLAIMER**: This project is not endorsed, sponsored, or affiliated with Google Cloud and/or the Rust Foundation.
### Why?
Performance.
The official Google Cloud Pub/Sub emulator would make our machines come to a crawl under moderate load (for example,
integration testing with >50 topics + subscriptions). Even after the tests were done, the emulator would still be
spinning the CPU. Frequent restarts were needed, as performance degraded over time.Deltio is a minimal implementation of a Google Cloud Pub/Sub emulator that supports the core features needed
to use Pub/Sub.# Installation
You can either:
* [Download the latest release](https://github.com/jeffijoe/deltio/releases/latest) for your platform.
* Use Docker:```bash
docker run -p 8085:8085 ghcr.io/jeffijoe/deltio:latest
```# Running
When running outside of Docker (at least on macOS), it is recommended to increase the max open files limit to prevent the `too many open files` error.
```bash
$ ulimit -n unlimited
```Assuming you have placed `deltio` somewhere in your `$PATH`, run Deltio with the default options (port: `8085`):
```bash
$ deltio
```To use a different port:
```bash
$ deltio --bind 0.0.0.0:1337
```To see a list of options:
```bash
$ deltio --help
```# Limitations
As of this time, Deltio has **very limited functionality**, much less than the official Google Cloud Pub/Sub emulator.
**Currently supported features:**
* Create topic
* Only the `name` property is respected
* Get topic
* List topics in a project
* Publish messages
* Only the `data` and `attributes` properties are respected
* Delete topics
* Create subscription
* Supports `name` and `ack_deadline_seconds` properties
* Get subscription
* List subscriptions in a project
* List subscription names in a topic
* Modify ACK deadlines
* ACK messages
* Pull messages
* Streaming-pull messages
* Including handling stream requests for acks and deadline modifications
* Does **NOT** support flow control properties
* Push subscriptions
* No flow control
* Message expiration
* Deleting subscriptionsIf something is not listed above, it's probably not supported yet. For example: message ordering, exactly-once delivery, deadletter and expiration policies, are not supported.
# Compiling from source
Deltio is written in Rust, and requires a Protocol Buffers compiler. This is because the [official Google Cloud Pub/Sub protos](https://github.com/googleapis/googleapis/blob/master/google/pubsub/v1/pubsub.proto) are used to generate the server code.
With both of those configured, you can simply run:
```bash
cargo build --release
```# What's in a name?
> In Greek, the term "deltio" (δελτίο) translates to "bulletin" or "announcement." It is commonly used to refer to a document or publication that provides information, updates, or news about a particular topic. For example, a "deltio" can be a newsletter, a news bulletin, or an official communication issued by an organization or government entity.
>
>~ ChatGPT# Author
Jeff Hansen - [@Jeffijoe](https://twitter.com/Jeffijoe)