https://github.com/ghokun/rabbitmq-lock
Using RabbitMQ as distributed lock
https://github.com/ghokun/rabbitmq-lock
distributed-lock rabbitmq
Last synced: 12 months ago
JSON representation
Using RabbitMQ as distributed lock
- Host: GitHub
- URL: https://github.com/ghokun/rabbitmq-lock
- Owner: ghokun
- License: apache-2.0
- Created: 2024-10-17T10:01:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-25T10:17:32.000Z (over 1 year ago)
- Last Synced: 2025-02-25T11:26:13.234Z (over 1 year ago)
- Topics: distributed-lock, rabbitmq
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rabbitmq-lock
Using RabbitMQ as distributed lock
Example run:
```shell
docker compose up --build
...
Attaching to rabbitmq-lock-1, rabbitmq-lock-2, rabbitmq-lock-3, rabbitmq-lock-4, rabbitmq-lock-5
rabbitmq-lock-3 | 2024/10/17 13:02:13 starting app
rabbitmq-lock-1 | 2024/10/17 13:02:13 starting app
rabbitmq-lock-5 | 2024/10/17 13:02:13 starting app
rabbitmq-lock-2 | 2024/10/17 13:02:13 starting app
rabbitmq-lock-4 | 2024/10/17 13:02:13 starting app
rabbitmq-lock-2 | 2024/10/17 13:02:15 i don't have the lock :(
rabbitmq-lock-5 | 2024/10/17 13:02:15 i don't have the lock :(
rabbitmq-lock-3 | 2024/10/17 13:02:15 i have the lock :)
rabbitmq-lock-4 | 2024/10/17 13:02:15 i don't have the lock :(
rabbitmq-lock-1 | 2024/10/17 13:02:15 i don't have the lock :(
rabbitmq-lock-2 | 2024/10/17 13:02:20 i don't have the lock :(
rabbitmq-lock-3 | 2024/10/17 13:02:20 i don't have the lock :(
rabbitmq-lock-1 | 2024/10/17 13:02:20 i have the lock :)
rabbitmq-lock-4 | 2024/10/17 13:02:20 i don't have the lock :(
rabbitmq-lock-5 | 2024/10/17 13:02:20 i don't have the lock :(
```