Git Product home page Git Product logo

rmqpubsub's Introduction

RabbitMQ Publish and Subscribe (RmqPubSub)

===

Description

The purpose of this tool is to have one application that can act as a message producer (publisher) and as a long-running message consumer (subscriber). The ultimate goal was to verify behavior of a RabbitMQ cluster that is sitting behind a load balancer.

Multiple consumers can get created in the same console window or spread them over multiple console windows. Each consumer will identify itself it if prints any information to the console window.

Nerd About

RmqPubSub is a C# console app that targets .NET 4.5. We reference the following packages:

  • CommandLineParser -> provide useful commands to the console app
  • Costura.Fody -> bundle dll references as embedded resources to keep the output to a single executable
  • Newtonsoft.Json -> JSON manipulation
  • RabbitMQ.Client -> communicate with RabbitMQ

Example Commands

  • Commands publish and consume support the --debug flag which will attach a debugger at the entry point of the command.
  • --help is supported and gives detailed information directly in the console.

rmqpubsub.exe publish --server <SERVER_ADDRESS> --vhost <VHOST_NAME> --exchange <EXCHANGE_NAME> --queue <QUEUE_NAME> --username <RABBITMQ_USERNAME> --password <RABBITMQ_PASSWORD> --message <MESSAGE> --times <TIMES>

<SERVER_ADDRESS> -> name or ip address of the load balancer or specific node <VHOST_NAME> -> name of the virtual host in RabbitMQ -> name of the exchange in RabbitMQ -> name of the queue in RabbitMQ <RABBITMQ_USERNAME> -> the username of the RabbitMQ user <RABBITMQ_PASSWORD> -> the password of the RabbitMQ user -> the data to send in the message -> the amount of times to send the message, default is 1

rmqpubsub.exe consume --server <SERVER_ADDRESS> --vhost <VHOST_NAME> --queue <QUEUE_NAME> --username <RABBITMQ_USERNAME> --password <RABBITMQ_PASSWORD> --howmany <HOW_MANY>

<SERVER_ADDRESS> -> name or ip address of the load balancer or specific node <VHOST_NAME> -> name of the virtual host in RabbitMQ -> name of the queue in RabbitMQ <RABBITMQ_USERNAME> -> the username of the RabbitMQ user <RABBITMQ_PASSWORD> -> the password of the RabbitMQ user <HOW_MANY> -> how many consumers to create, default is 1

rmqpubsub's People

Contributors

ryanrodemoyer avatar

Watchers

James Cloos avatar  avatar

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.