Code Monkey home page Code Monkey logo

rabbitmq-benchmark's Introduction

Rabbitmq benchmark

Simple rabbitmq benchmark tool which produce high load messages using goroutines as worker threads.

Install

tar -xvf rabbitmq-benchmark_linux_amd64.tar.gz
chmod +x rabbitmq-benchmark

Usage

  • Running rabbitmq-benchmark as consumer
./rabbitmq-benchmark -r consumer -t 4 -s 20 -url amqp://guest:guest@localhost:5672
  • Running rabbitmq-benchmark as producer
./rabbitmq-benchmark -r producer -t 4 -s 20 -url amqp://guest:guest@localhost:5672

Consumer & producer needs to run in separate shell as selected using -r flage.

  • Basic cli usage
Usage of ./rabbitmq-benchmark:
  -debug
        enable debug logging
  -f int
        producer message frequency
  -n string
        name of the amqp queue (default "queue")
  -quorum
        enable quorum queue type
  -r string
        Select consumer or producer (default "consumer")
  -s int
        producer message size (default 10)
  -t int
        Num of worker threads (default 3)
  -url string
        Rabbitmq connection string (default "amqp://guest:guest@localhost:5672")

Build

Golang build from source.

git clone github.com/ragul28/rabbitmq-benchmark
cd rabbitmq-benchmark
make build

Rabbitmq Cluster setup

  • Run cluster using docker compose
cd cluster/
docker-compose up -d
  • Enable classic queue mirroring & auto node sync
docker exec -it rabbitmq-01 rabbitmqctl set_policy ha-fed \
    ".*" '{"ha-mode":"all", "federation-upstream-set":"all", "ha-sync-mode":"automatic", }' \
    --priority 1 \
    --apply-to queues

Create Admin user

# add user
rabbitmqctl add_user admin admin
# set user as admin
rabbitmqctl set_user_tags admin administrator
# set all permission
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

rabbitmq-benchmark's People

Contributors

ragul28 avatar

Watchers

 avatar  avatar

rabbitmq-benchmark's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.