1) android (client):

Getting Started with RabbitMQ on Android – Part 1介绍了如何在android上使用rabbitmq接收server端的push通知。

2) server :

server端安装rabbitmq,写了个python脚本来发送消息,例子代码:

#!/usr/bin/env python
import pika
import time

connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()


channel.queue_declare(queue='hello')

i = 0
while True:
channel.basic_publish(exchange='logs',
routing_key='hello',
body='Hello World, ' + str(i))
print " [x] Sent 'Hello World!'" + str(i)
i += 1
time.sleep(1)
connection.close()

关于用python如何用rabbitmq发消息,参见:RabbitMQ introduction

代码见:rabbitmq(RabbitMQ - messaging that just works)

更多相关文章

  1. Android(安卓)日志系统logcat内核代码分析
  2. Android:控件GridView的使用
  3. android操作sqlite3的blob字段
  4. Android的滑动手势处理
  5. 编写android jni代码时遇到的问题
  6. Android实现九宫格
  7. 界面可视化工具------DroidDraw
  8. Android(安卓)代码自动提示功能
  9. Android实现九宫格

随机推荐

  1. Android之MotionLayout(五),如何使用 Mot
  2. android中gallery的使用
  3. 自动换行
  4. Android(安卓)打勾显示输入的密码
  5. 线性布局LinearLayout(二)小练习
  6. MainFest.xml android
  7. android开发之android:padding和android:
  8. js 判读是iPhone还是Android
  9. Android(安卓)获取手机卡相关信息
  10. android布局属性详解