6
0
mirror of https://git.mills.io/prologic/msgbus.git synced 2024-06-16 03:49:03 +00:00
Commit Graph

18 Commits

Author SHA1 Message Date
James Mills
e7f0248805 Set a unique client id per subscriber connection (#35)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/prologic/msgbus/pulls/35
2022-04-04 01:56:56 +00:00
James Mills
6bfb669347 Add support for a write-ahead-log (WAL) to persist messages (#33)
Closes #31

Adds support for a write-ahead-log (WAL) for messages per queue/topic. This is now the new default behaviour and adds a new CLI flag `-l/--log-path` and Env var `LOG_PATH` to configure where the logs are stored.

On startup, the message bus will refill the queues with the contents of messages from persisted log files with the most recent `-Q/--max-queue-size` number of items.

That is, on startup/crash the queues/topics will always contain the same messages as if the message bus had never restarted or crashed in the first place.

This has a benefit of actually making the per-topic sequence number _actually_ monotic increasing integers and something that can be relied upon when indexing into a queue/topic for subscribers with the `-i/--index` / `Index` option.

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/prologic/msgbus/pulls/33
2022-04-03 15:59:38 +00:00
James Mills
7b71102aa8 Add support for subscribers to start from an index (#26)
Closes #20

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: xuu <xuu@noreply@mills.io>
Reviewed-on: https://git.mills.io/prologic/msgbus/pulls/26
2022-04-02 14:05:15 +00:00
James Mills
6c83501d5d
go mod tidy 2022-04-02 14:08:14 +10:00
James Mills
929cfd3a36
Fix response for empty topic/queue by responding with HTTP 204 No Content instead of 404 Not Found (Fixes #25) 2022-03-31 20:55:03 +10:00
James Mills
a5ef82800e
Add CORS headers so bus can be accessed cross-origin 2022-03-31 12:45:29 +10:00
xuu
7181b6df1b feat: Add Content-Encoding support for brotli, gzip, and deflate (#24)
feat: Add Content-Encoding support for brotli, gzip, and deflate
Co-authored-by: Jon Lundy <jon@xuu.cc>
Reviewed-on: https://git.mills.io/prologic/msgbus/pulls/24
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-03-29 22:03:38 +00:00
James Mills
3f72ec8444
Partially unrevert 6a840a2 2022-03-27 14:47:14 +10:00
James Mills
6a840a26b4
Revert "change gorilla/websocket to nhooyr.io/websocket"
This reverts commit ec8dbec63232c1c78881a19a18e11f4dd9b63935.
2022-03-27 12:42:56 +10:00
nilsocket
ec8dbec632
change gorilla/websocket to nhooyr.io/websocket 2022-03-26 23:15:34 +05:30
James Mills
9e1d03846e
Fix client spport for wasm by partially migrating from gorilla/websocket to nhooyr.io/websocket (See #17) 2022-03-25 22:35:28 +10:00
James Mills
152a7664bd
Improve the msgbusd cli flag and env var handling 2022-03-21 10:10:22 +10:00
James Mills
d6d0a1e95b
Cleanup logging 2022-03-21 02:12:31 +10:00
James Mills
625201bda0
Update deps 2022-03-20 23:06:49 +10:00
James Mills
ef4f1b7b67
go mod tidy 2022-03-19 23:24:16 +10:00
James Mills
129efabcc3
Fix import paths 2021-07-13 07:57:54 +10:00
James Mills
689ca42f81
Cleanup 2019-04-02 21:49:50 +10:00
James Mills
8d19831a86
Migrate to Drone CI (cloud), CodeCov and Go11Modules 2018-12-31 18:05:23 +10:00