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
* Fixed drop rate for subscriber listeners by adding buffering to channels (configurable)
* Added optinoal pprof support
* Added profile target for running profiled benchmarks
* Added GET / (empty) test
* Added POST /hello test
* Added PUT /hello test
* Added simple e2e test (POST & GET)
* Add Subscriber test (fixed some race conditions)