在android中使用rabbitmq进行聊天 [英] using rabbitmq in android for chat
问题描述
我们已经在android中实现了rabbitmq聊天.但是rabbitmq的java客户端很耗电.rabbitmq适合安卓聊天吗?我们已经使用直接交换个人队列和个人路由键.rabbitmq中一对一聊天的最佳设计模式是什么.以及减少电池使用量的方法
We have implemented rabbitmq chat in android. but java client of rabbitmq is power hungry.is rabbitmq good for android chat?. we have used direct exchange individual queue for persons and individual routing keys. what is the best design pattern for one to one chat in rabbitmq. and also ways to reduce battery usage
推荐答案
我不认为直接使用 RabbitMQ 来开发聊天是更好的解决方案.
I don't think that use RabbitMQ directly for developing a chat is the better solution.
还有其他更轻松的解决方案请阅读此帖子MQTT.
There are other solution more light please read this post about MQTT.
另一种标准解决方案是使用 XMPP 协议(例如 whatsup 使用自定义 XMPP).
Another standard solution is use XMPP protocol (for example whatsup uses a custom XMPP).
我们做了一些测试,也遇到了一些关于电池消耗的问题.
We made some test and we also had some problem about battery consuming.
顺便说一句,您可以混合使用这些技术,将 RabbitMQ 混合为后端,将其他一些服务器(XMPP、MQTT)混合为前端.
BTW, you can mix the technologies, mixing RabbitMQ as back-end and some other server (XMPP,MQTT) as front-end.
阅读这篇关于 MQTT 的帖子.
Read this post about the MQTT.
Facebook Messenger 使用的 MQTT
MQTT used by Facebook Messenger
编辑
我会添加这篇文章 MQTT 与 XMPP 我应该选择哪个?
EDIT2
另请阅读 this 和 this on the official rabbitmq-group
Please read also this and this on the official rabbitmq-group
这篇关于在android中使用rabbitmq进行聊天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!