Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hden/cloud-pubsub-batch-publisher
Batch publisher for Google Cloud PubSub
https://github.com/hden/cloud-pubsub-batch-publisher
Last synced: 3 months ago
JSON representation
Batch publisher for Google Cloud PubSub
- Host: GitHub
- URL: https://github.com/hden/cloud-pubsub-batch-publisher
- Owner: hden
- License: apache-2.0
- Created: 2019-04-08T04:12:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-16T23:36:21.000Z (8 months ago)
- Last Synced: 2024-05-17T00:42:54.620Z (8 months ago)
- Language: Clojure
- Homepage: https://clojars.org/hden/cloud-pubsub-batch-publisher
- Size: 43.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloud-pubsub-batch-publisher
A batch publisher for Google Cloud PubSub.
## Installation
## Usage
```clj
(require '[cloud-pubsub-batch-publisher.core :as pubsub])(def publisher (pubsub/publisher "TOPIC-NAME")
;; In a single publish request, all messages must have no ordering key
;; or they must all have the same ordering key.
;; See https://cloud.google.com/pubsub/docs/ordering
(def messages
[{:message "MESSAGE" ;; String, required
:metadata {"KEY" "VALUE"} ;; Map, optional
:ordering-key "KEY"}]) ;; String, optional(pubsub/publish! publisher {:messages messages})
(pubsub/shutdown! publisher {:await-msec 1000})
```## License
Copyright © 2021 Haokang Den