Fall is almost here! According to The Boston Globe, it appears that the demand for pumpkin spice increases as soon as the air begins to feel crisp. Customers eagerly anticipate the arrival of their favourite products, and according to Study Finds, fall is the season most people identify with their preferred seasonal cuisine. In addition to pumpkin spice, flavours inspired by apple pie and apple cider are also available. Some pecan praline products are also available as a homage to the Thanksgiving holiday's prized pie (via Study Finds). Of course, not all seasonal foods are sweets. Many fast food restaurants provide turkey, stuffing, and mashed potatoes sandwiches, along with some cranberry sauce for good measure (so does Wawa). https://mcdvoiceo.shop https://tellthebello.shop https://krogerfeedbacka.shop https://talktowendysu.shop https://pandaguestexperienceu.shop https://wwwlowescomsurvey.shop https://dgcustomerfirstu.shop https://itellculvers.shop https://jacklistenso.shop https://biglotscomsurveyo.shop https://talktostopandshopo.shop The market for seasonal love hasn't entirely been cornered by fall, either. When it comes to nostalgic pleasures, Christmas is no slouch. While everything is peppermint-flavored around the holidays, hot chocolate also makes a grand appearance in the winter. For a satisfying cold-weather beverage, hot chocolate is difficult to top. Although it is rarely the best, egg nog has a devoted following (per Wide Open Eats). Although fall and winter foods often have superior flavours, there is one seasonal fast food that people wish they could have all year round.

RabbitMQ server setup with Android app communication – [ NGK ]

I spent more than 12 hours in setting up RabbitMQ server in Ubuntu and creating an Android app which communicates from server and also communicates with other devices through the server. So I thought it will be good to share the whole information I found in a single place. I found information from various sources.




And as usual from http://www.stackoverflow.com

I am using Ubuntu 12.04. This tutorial is completely based on this. So I am not sure how will it work on Windows or Mac OS.

A. Install the latest version of RabbitMQ as per the instruction from here

  1. Add the following line to your /etc/apt/sources.list:
    deb http://www.rabbitmq.com/debian/ testing main

    (Please note that the word testing in this line refers to the state of our release of RabbitMQ, not any particular Debian distribution. You can use it with Debian stable, testing or unstable, as well as with Ubuntu. We describe the release as “testing” to emphasise that we release somewhat frequently.)

  2. (optional) To avoid warnings about unsigned packages, add our public key to your trusted key list using apt-key(8):
    wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
    sudo apt-key add rabbitmq-signing-key-public.asc
  3. Run apt-get update.
  4. Install packages as usual; for instance,
    sudo apt-get install rabbitmq-server

B. It is better to have a GUI client. It comes along with the installation. We just need to enable it. To enable the plugin follow the steps given below.

Install rabbitmq-server

$ sudo apt-get install rabbitmq-server

Enable the rabbitmq-management plugin

$ sudo /usr/lib/rabbitmq/lib/rabbitmq_server-2.7.1/sbin/rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:

Plugin configuration has changed. Restart RabbitMQ for changes to take effect.

Restart rabbitmq-server for the changes to take affect.

$ sudo service rabbitmq-server restart
Restarting rabbitmq-server: SUCCESS

Checked the newly enabled plugins

$ sudo /usr/lib/rabbitmq/lib/rabbitmq_server-2.7.1/sbin/rabbitmq-plugins list
[e] amqp_client 0.0.0
[ ] eldap 0.0.0-git
[ ] erlando 0.0.0
[e] mochiweb 1.3-rmq0.0.0-git
[ ] rabbitmq_auth_backend_ldap 0.0.0
[ ] rabbitmq_auth_mechanism_ssl 0.0.0
[ ] rabbitmq_consistent_hash_exchange 0.0.0
[ ] rabbitmq_federation 0.0.0
[ ] rabbitmq_jsonrpc 0.0.0
[ ] rabbitmq_jsonrpc_channel 0.0.0
[ ] rabbitmq_jsonrpc_channel_examples 0.0.0
[E] rabbitmq_management 0.0.0
[e] rabbitmq_management_agent 0.0.0
[ ] rabbitmq_management_visualiser 0.0.0
[e] rabbitmq_mochiweb 0.0.0
[ ] rabbitmq_shovel 0.0.0
[ ] rabbitmq_shovel_management 0.0.0
[ ] rabbitmq_stomp 0.0.0
[ ] rabbitmq_tracing 0.0.0
[ ] rfc4627_jsonrpc 0.0.0-git
[e] webmachine 1.7.0-rmq0.0.0-hg

I could new access the mangement plugin via:

Username: guest
Password: guest

If doesn’t work try 192.168.1.*

C. Lets jump on creating Android app.

Download the latest RabbitMQ jar files from here

Just follow the steps given in Simon W Dixon blog. Link is given at the top. If you want more real time application use the Kamrana blog app. Download the code from Git repository here

We can also send message from server to client using the app.

RabbitMQ android chat app
RabbitMQ android chat app

Ping me if you have any doubts 🙂

2 thoughts on “RabbitMQ server setup with Android app communication

  1. Hi there, i followed your code into building this chat with rabbitmq… but having a problem where i have a double or even more repeated received messages when the user is the one sending them. Even in your example picture of the application working it is visible that you send a Hi Trisha.. and you received it twice. Can you help me with this?! =)


Place for your comments....

This site uses Akismet to reduce spam. Learn how your comment data is processed.