Giter Club home page Giter Club logo

message-queue's Introduction

Overview

This project consists of 2 components, the actual messaging queue and the client operators, which communicate with the messaging queue, retrieving and sending messages.

Build

Building this project is relatively simple. There are no 3rd party dependencies as everything is written with the standard go library. To build the binary file for this project, simply write the following command:

go build -o dist/message-queue main.go

This will place an executable file in the dist folder.

Running the application

This project is always run with the main binary, using CLI parameters to determine the behaviour and role of the running software. All examples will use an already compiled binary with the filename message-queue. Please note, on windows systems, this file will be named message-queue.exe.

Start Message Queue

To start the message queue listening on all address (0.0.0.0) on port 1234 use the following command:

./message-queue -qhost="0.0.0.0" -port=1234 -server

Send a file to the Message Queue

To send a file with the name textfile.txt use the following command:

./message-queue -file="textfile.txt"

Start a Subscriber

To start the service as a subscriber, use the following command, specifying the queue service to connect to:

./message-queue -qhost="localhost" -port=1234 -subscribe

This will attempt to connect to a queue service on localhost:1234/tcp and subscribe to any messages in the queue. Note, that adding the -subscribe parameter will always start a subscriber, so it is possible to send a file and subscribe on the same service, using the following command:

./message-queue -file="textfile.txt" -subscribe

Help

For a list of all commands, please use the following command:

./message-queue -h

Todo

  • Implement unsubscribe on graceful shutdown
    • And implement unsubscribe on bad connection
  • Implement multiple exchanges / routes
  • Implement send retries
    • Implement send retries pr. client

Contact

For inquiries that cannot be handled with an issue request, please contact [email protected]

message-queue's People

Contributors

kaaquist avatar pungyeon avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

kaaquist

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.