Skip to content

Commit

Permalink
Use quorum queues with size 3
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Dobrelya <[email protected]>
  • Loading branch information
bogdando committed Jul 27, 2021
1 parent a5e8828 commit de0887d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions rabbitmq_ocf_pcmk/src/jepsen/rabbitmq_ocf_pcmk.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@
(with-ch [ch conn]
; Initialize queue
(lq/declare ch queue
{:durable false
{:durable true
:auto-delete false
:exclusive false})))
:exclusive false
:arguments {"x-queue-type" "quorum"
"x-quorum-initial-group-size" 3}})))

(defrecord QueueClient [conn]
client/Client
Expand Down Expand Up @@ -177,9 +179,11 @@
:automatically-recover false})]
(with-ch [ch conn]
(lq/declare ch "jepsen.semaphore"
{:durable false
{:durable true
:auto-delete false
:exclusive false})
:exclusive false
:arguments {"x-queue-type" "quorum"
"x-quorum-initial-group-size" 3}})

; Enqueue a single message
(when (compare-and-set! enqueued? false true)
Expand Down

0 comments on commit de0887d

Please sign in to comment.