Brew Rabbitmq



Brew rabbitmq stop

RabbitMQ is an open source message broker software. It is lightweight and easy to deploy. It supports AMQP (Advanced Message Queuing Protocol), STOMP (Streaming Text Oriented Messaging Protocol), MQTT (Message Queuing Telemetry Transport) and other protocols. Alright, let's install RabbitMQ on Mac using Homebrew. I'm pulling my hair on what i guess is a brew issue, and could not find any answer online. I am not able to start a valid RabbitMQ server with brew services start rabbitmq.Everything seams fine and the service appears to be running in brew services list, but is unavailable to rabbitmqctl status.However i am able to start and communicate with the server when I start it via rabbitmq-server.

Latest version

Released:

A Chat Server based on AMQP using RabbitMQ message broker implementing AMQP, websocket, sockjs, sockjs-tornado, tornado, and amqp python client library, Pika

Project description

rabbitChat
A Chat-Server/Chat-System based on AMQP protocol(RabbitMQ Message Broker)
Documentation
--------------
**Link :** http://rabbitchat.readthedocs.io/en/latest/index.html
Details
--------
:Author: Anirban Roy Das
:Email: anirban.nick@gmail.com
:Copyright(C): 2016, Anirban Roy Das <anirban.nick@gmail.com>
Check ``rabbitChat/LICENSE`` file for full Copyright notice.
Overview
---------
rabbitChat is a very simple Chat Server which can be set up locally to chat in your LAN. It supports both **Public Chat** among all participants connected simultaneously at a particular time and also **Private Chat** betweent those individual participants.
It uses the `AMQP <https://www.amqp.org/>`_ protocol to implement the real time message passing system. **AMQP** is implemented in many languages and in many softwares, once of such is `RabbitMQ <https://www.rabbitmq.com/>`_ , which is a message broker implementing the `AMQP <https://www.amqp.org/>`_ protocol.
The connection is created using the `sockjs <https://github.com/sockjs/sockjs-client>`_ protocol. **SockJS** is implemented in many languages, primarily in Javascript to talk to the servers in real time, which tries to create a duplex bi-directional connection between the **Client(browser)** and the **Server**. Ther server should also implement the **sockjs** protocol. Thus using the `sockjs-tornado <https://github.com/MrJoes/sockjs-tornado>`_ library which exposes the **sockjs** protocol in `Tornado <http://www.tornadoweb.org/>`_ server.
It first tries to create a `Websocket <https://en.wikipedia.org/wiki/WebSocket>`_ connection, and if it fails then it fallbacks to other transport mechanisms, such as **Ajax**, **long polling**, etc. After the connection is established, the tornado server**(sockjs-tornado)** connects to **rabbitMQ** via AMQP protocol using the **AMQP Python Client Library**, `Pika <https://pypi.python.org/pypi/pika>`_.
Thus the connection is *web-browser* to *tornado* to *rabbitMQ* and vice versa.
Technical Specs
----------------
:sockjs-client: Advanced Websocket Javascript Client
:Tornado: Async Python Web Library + Web Server
:sockjs-tornado: SockJS websocket server implementation for Tornado
:AMQP: Advance Message Queuing Protocol used in Message Oriented Middleware
:pika: AMQP Python Client Library
:RabbitMQ: A Message Broker implementing AMQP
Features
---------
* Public chat
* Shows who joined and who left
* Shows number of people online
* Shows who is typing and who is not
* Join/Leave chat room features
Installation
------------
Prerequisites
~~~~~~~~~~~~~
1. python 2.7+
2. tornado
3. sockjs-tornado
4. sockjs-client
5. pika
6. rabbitMQ
Install
~~~~~~~
::
$ pip install rabbitChat
If above dependencies do not get installed by the above command, then use the below steps to install them one by one.
**Step 1 - Install pip**
Follow the below methods for installing pip. One of them may help you to install pip in your system.
* **Method 1 -** https://pip.pypa.io/en/stable/installing/
* **Method 2 -** http://ask.xmodulo.com/install-pip-linux.html
* **Method 3 -** If you installed python on MAC OS X via ``brew install python``, then **pip** is already installed along with python.
**Step 2 - Install tornado**
::
$ pip install tornado
**Step 3 - Install sockjs-tornado**
::
$ pip install sockjs-tornado
**Step 4 - Install pika**
::
$ pip install pika
**Step 5 - Install RabbitMQ**
* *For* ``Mac`` *Users*
1. Brew Install RabbitMQ
::
$ brew install rabbitmq
2. Configure RabbitMq, follow this `link <https://www.rabbitmq.com/install-homebrew.html>`_, this `one <https://www.rabbitmq.com/install-standalone-mac.html>`_ and `this <https://www.rabbitmq.com/configure.html>`_.
* *For* ``Ubuntu/Linux`` *Users*
1. Enable RabbitMQ application repository
::
$ echo 'deb http://www.rabbitmq.com/debian/ testing main' >> /etc/apt/sources.list
2. Add the verification key for the package
::
$ wget -o http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | sudo apt-key add -
3. Update the sources with our new addition from above
::
$ apt-get update
4. And finally, download and install RabbitMQ
::
$ sudo apt-get install rabbitmq-server
5. Configure RabbitMQ, follow this `link <http://www.rabbitmq.com/install-debian.html>`_, this `one <https://www.rabbitmq.com/configure.html>`_ and `this <https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-rabbitmq>`_.
Usage
-----
After having installed rabbitChat, just the run the following commands to use it:
* **RabbitMQ Server**
1. *For* ``Mac`` *Users*
::
# start normally
$ rabbitmq-server
# If you want to run in background
$ rabbitmq-server --detached
# start using brew rervices (doesn't work with tmux)
$ brew services rabbitmq start
2. *For* ``Ubuntu/LInux`` *Users*
::
# start normally
$ rabbitmq-server
# If you want to run in background
$ rabbitmq-server --detached
# To start using service
$ service rabbitmq-server start
# To stop using service
$ service rabbitmq-server stop
# To restart using service
$ service rabbitmq-server restart
# To check the status
$ service rabbitmq-server status
* **Start rabbitChat Server**
::
$ rabbitChat [options]
- **Options**
:--port: Port number where the chat server will start
- **Example**
::
$ rabbitChat --port=9191
* **Stop rabbitChat Server**
Click ``Ctrl+C`` to stop the server.
Todo
-----
1. Add Private Chat functionality.
2. Manage Presence Management, sent, delivered acknowledgements.
3. Message Persistence and delivery of messages to offline clinets.
4. Add Blog post regarding this topic.

Release historyRelease notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rabbitChat, version 1.0.0
Filename, sizeFile typePython versionUpload dateHashes
Filename, size rabbitChat-1.0.0-py2-none-any.whl (35.5 kB) File type Wheel Python version py2 Upload dateHashes
Filename, size rabbitChat-1.0.0.tar.gz (1.2 MB) File type Source Python version None Upload dateHashes
Close

Hashes for rabbitChat-1.0.0-py2-none-any.whl

Hashes for rabbitChat-1.0.0-py2-none-any.whl
AlgorithmHash digest
SHA256c05cfe775f9998da2c332fb04d56b3c1d2805caabb5297c7606774c2b43d9da9
MD5ad015fefd877624e3ede6146af58834b
BLAKE2-2562f62ba89bbfcc0006b4e605f12365b0ae3b7d4541e000cbb34b4b6dad0fffadc
Close

Hashes for rabbitChat-1.0.0.tar.gz

Hashes for rabbitChat-1.0.0.tar.gz
AlgorithmHash digest
SHA25647d969ff536f1fb752c7ec0e7edaf445452a7f75eed7f28cabecb6de540886ed
MD5999d920fb03d9d4b8c5e0ac80d47b626
BLAKE2-256d2e114334ae23d1716227615ad68c85010236aaf5dfb2ac524cf1621a5c89d95

In this tutorial, we will learn to install RabbitMQ on Mac using Homebrew.

RabbitMQ is an open source message broker software. It is lightweight and easy to deploy. It supports AMQP (Advanced Message Queuing Protocol), STOMP (Streaming Text Oriented Messaging Protocol), MQTT (Message Queuing Telemetry Transport) and other protocols.

Alright, let's install RabbitMQ on Mac using Homebrew.

Step 1: Install Homebrew

Homebrew is 'The missing package manager for macOS'.

Installing applications and packages using Homebrew on Mac is super easy. I will recommend you to use Homebrew if you are a developer and use Mac for dev work.

Okay, open Terminal and type the following command.

Once you have Homebrew installed on your Mac, type the following command to check the version.

At the time of writing this tutorial I was using v2.0.1.

Already have Homebrew?

If you already have Homebrew installed on your Mac then run the following command to update it.

This will update the packages. If you have the latest updates then you will get the following output.

Step 2: Install RabbitMQ using Homebrew

Now, run the following command in Terminal to install RabbitMQ.

Step 3: Add to PATH

RabbitMQ server and CLI script are installed under /usr/local/sbin. Add this to PATH.

I have added the following to .bash_profile file.

Inside the .bash_profile file.

Brew Rabbitmq

Where are the RabbitMQ server and CLI tools present?

RabbitMQ server and CLI tools are generally inside /usr/local/Cellar/rabbitmq/{version}/sbin/ directory.

On my Mac the RabbitMQ server and CLI tools are present inside the /usr/local/Cellar/rabbitmq/3.7.11/sbin/ directory.

Step 4: Start RabbitMQ server

To start the RabbitMQ run the following command.

Brew Install Rabbitmq

Step 5: Access dashboard

Brew Rabbitmq

We can access RabbitMQ web dashboard by going to http://localhost:15672 so, open the link in your favourite browser.

The default username and password is guest and guest respectively.


RabbitMQ dashboard.


Step 6: Stop RabbitMQ server

Brew Rabbitmq-server Command Not Found

To stop RabbitMQ press Ctrl + C.

Possible errors

We may get an error like The `brew link` step did not complete successfully when trying to install RabbitMQ.

To fix this we have to run the following command.

We get the error /usr/local/sbin is not writable message.

This is because /usr/local/sbin directory is not present. So, go to /etc/paths.d directory and created a file named usr_local_sbin and write the path /usr/local/sbin inside the file and save it.

Inside usr_local_sbin file:

Brew Rabbitmq Service

Now, create /usr/local/sbin directory.

Brew rabbitmq

Now change the ownership. Type whoami to get your username. Mine is yusufshakeel so, I will use the following.

Now run the brew link rabbitmq command.

Linking is done!

Brew Rabbitmq Stop

Please share this tutorial on social media if you find it useful and interesting. See you again in the next tutorial. Have fun :-)