• Stars
    star
    156
  • Rank 239,589 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 13 years ago
  • Updated over 13 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Web chat implemented with RabbitMQ and Websockets

RabbitMQ Chat

This project shows how to create a simple web chat room with RabbitMQ.

The chat server uses Websockets to send messages to the connected users. This means it only works with Chrome and Safari. Some browsers like Firefox 4 can be configured to enable Websockets.

On the RabbitMQ side there it uses a custom exchange to store the last 20 messages, so new users connecting to the chat room can get a context of what's going on. See the project Recent History Exchange for installation instructions.

This will be used as an example for the book RabbitMQ in Action.

Requirements

The Recent History Exchange has to be installed prior to running this application.

How does it work

Each user that connects to the server will get a private auto delete anonymous queue. This queue will be managed by an AMQP consumer. Whenever the AMQP consumer recieves a message it will forward it to the Websockets process and this one will send it to the user browser.

When the user is disconnects from the server his consumer gets closed and the queue deleted.

Building:

Get the source code:

$ git clone git://github.com/videlalvaro/rabbitmq-chat.git
$ cd rabbitmq-chat

Compile the source code:

$ make

Usage

Running in development mode

Edit the file ./priv/chat_dev.config to suit your RabbitMQ configuraion.

Start the server:

$ ./start-dev.sh

Point your browser to http://localhost:8080/. Invite your friends. Enjoy!

Running in production mode

Create a file called ./priv/chat.config with the proper values to suit your RabbitMQ configuraion.

See the file ./priv/chat_dev.config for an example of the configuraion format.

Start the server:

$ ./start.sh

Credits

Inspired by YakRiak

Original design adapted from YakRiak. Thanks Basho and the crew, specially @pharkmillups for being an awesome community manager.

License

See LICENSE.md

More Repositories

1

gifsockets

Real Time communication library using Animated Gifs as a transport™
Java
1,823
star
2

gen_microservice

Microservices for Erlang
Erlang
93
star
3

rabbit-internals

Documentation about the RabbitMQ internals
89
star
4

clochure

Clochure - A better Clojure
Java
85
star
5

rmq_patterns

Implementation of several messaging patterns with RabbitMQ and AMQP
Erlang
79
star
6

phacterl

The Actor Model in PHP
PHP
76
star
7

erlang-prime-sieve

Naive Parallel Prime Numbers Sieve
Erlang
37
star
8

cloudstagram

Sample Instagram Clone wannabe website for Cloud Foundry
JavaScript
34
star
9

rabbitmq-websockets

RabbitMQ Plugin that bridges AMQP to Websockets
Erlang
32
star
10

mypeb

PHP Erlang Bridge
HTML
26
star
11

closerl

Clojure Erlang Bridge using JInterface
Clojure
23
star
12

azserverless

PHP Custom Handler for Azure Functions Serverless
PHP
18
star
13

rabbitmq-recent-history-exchange-elixir

The Recent History Exchange Implemented in Elixir
Elixir
18
star
14

rabbitmq-stream

RabbitMQ Stream plugin for message distribution aka queue sharding
Erlang
16
star
15

InspectorD

python server to inspect php sessions
Python
14
star
16

cloudfoundry-octopress

Deploy your octopress blogs to Cloud Foundry
Ruby
12
star
17

tamedrabbit

Shell
12
star
18

claude

Utilities to connect Clojure with Cloud Foundry
Clojure
12
star
19

number-theory-and-computing

Readings in Number Theory and Computing
CSS
12
star
20

rmq_msmq

RabbitMQ Microsoft MQ bridge
F#
11
star
21

msg_store_bitcask_index

RabbitMQ message store index with Bitcask Backend
Erlang
9
star
22

elixir_wrapper

Wrapper for Elixir Lang to write RabbitMQ plugins
8
star
23

cloudfoundry-clojure-demo

Demo for Clojure integration with Cloud Foundry using claude
Clojure
8
star
24

sfTwigPlugin

Symfony Plugin to enable Twig usage in templates.
PHP
7
star
25

rabbitmq-global-fanout-exchange

RabbitMQ Global Fanout Exchage - Fanouts messages to all queues
Erlang
6
star
26

phpcask

PHP Client for the Bitcask K/V store
PHP
6
star
27

rmq_ws_test

Sample project for the RabbitMQ Websockets Plugin
Erlang
5
star
28

Enable-Sites

Manage apache2 virtual hosts in Mac ala Ubuntu:
Shell
4
star
29

todos_hackday

Hackday app using Webmachine and Ember.js
Erlang
4
star
30

upload_image

How to upload an image to Azure Blog Storage using Azure Functions
JavaScript
3
star
31

erlang_credis

Redis C Driver for Erlang based on credis
C
3
star
32

fabric-kafka-sample

Java
3
star
33

ServerlessComputer

A Serverless Computer running on Azure Functions
JavaScript
2
star
34

thanksgiving

Demo nodejs app that consumes the Instagram Api
JavaScript
2
star
35

misultin_wrapper

Misultin web server wrapper to be used for RabbitMQ Plugin Development
2
star
36

avRedisLoggerPlugin

Sample symfony logger
PHP
2
star
37

bitcask_wrapper

Bitcask wrapper to be used to build RabbitMQ plugins
2
star
38

rabbitmq-es

Spanish Translation of www.rabbitmq.com
1
star
39

phone-guide

sample project showing how to test Java classes from ScalaCheck
Scala
1
star
40

videlalvaro.github.io

My own blog
CSS
1
star
41

panopticore

1
star
42

wolfskin

Clojure
1
star
43

test-app

PHP
1
star
44

eleveldb_wrapper

Eleveldb wrapper for RabbitMQ plugins
Makefile
1
star
45

scalable-web-architectures

Repository for my “Scalable Web Architectures” tution during my second semester of my master studies at the University of Applied Science in Salzburg.
JavaScript
1
star
46

connstring_to_amqp

Azure Service Bus Connection String to RabbitMQ Shovel converter
HTML
1
star