using rabbitmq in android for chat

前端 未结 3 1785
孤独总比滥情好
孤独总比滥情好 2021-02-06 09:55

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 p

3条回答
  •  温柔的废话
    2021-02-06 10:01

    Maybe you could combine RabbitMQ with GCM to save power as GCM gets triggered by the system and doesn´t need to keep any extra connection alive.

    For example:

    The app gets notified via GCM when any new event comes in. Then a new Rabbit connection gets established, retrieving the data and timeouting after a short while again, if no messages are coming in again.

    So the actual "hungryness" exists only for a short moment and only when neccessary.

    You can also analyze which users are tending to always write multiple messages close behind one other and vary the timeout based on that value

提交回复
热议问题