Skip to content

RabbitMQ Perf Test

Create a file called perf-test.yaml and paste the below code. Ensure that you change the namespace to a namespace that exists.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: perf-test-deployment
  namespace: rabbitmq-2
  labels:
    app: perf-test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: perf-test
  template:
    metadata:
      labels:
        app: perf-test
    spec:
      containers:
      - name: perf-test
        image: pivotalrabbitmq/perf-test:latest
        command: ["sleep", "10000"]
        resources:
          limits:
            memory: 384Mi
          requests:
            cpu: 20m
            memory: 156Mi

Run the following command to launch the pod

kubectl apply -f perf-test.yaml

Exec into the machine

kubectl exec -it perf-test-deployment-85d645d8f6-w2dw8 -n rabbitmq-2 -- sh

Run the perf tool. Please note the below details are for Stage.

java -jar perf-test.jar --uri amqp://user:5cyykbLP2w@minority-rabbitmq.rabbitmq:5672 --quorum-queue --queue test-new -queue-args x-quorum-initial-group-size=5 -x 1 -y 2

More options on the tool here https://perftest.rabbitmq.com/

You can access the management console on

http://:15672

Load balancer IP can be got with kubectl get svc -n rabbitmq