Yong
Yong

Reputation: 758

RabbitMQ - How to save message for new consumer

Working on a new chat project, We want to use RabbitMQ to transfer our message.

So can RabbitMQ save all the message in queue or some other place, when an new people(consumer) comes, the RabbitMQ can flush the saved message to the new people?

Upvotes: 0

Views: 2581

Answers (2)

WBAR
WBAR

Reputation: 4984

Please read the tutorial to understand what RabbitMQ is.

RabbitMQ is a message broker: it accepts and forwards messages. You can think about it as a post office: when you put the mail that you want posting in a post box, you can be sure that Mr. or Ms. Mailperson will eventually deliver the mail to your recipient. In this analogy, RabbitMQ is a post box, a post office and a postman.

Upvotes: 0

Gabriele Santomaggio
Gabriele Santomaggio

Reputation: 22682

If you use a persistent queue, rabbitmq can store the messages (the messages are stored in the same mnesia-db path). So suppose that each user has a own queue, when the user gets on line can download the messages.

Anyway I don’t think it is a good idea use rmq to push messages for chat. There are others appropriate technologies, like MQTT, XMPP.

I suggest to read this post: using rabbitmq in android for chat

Upvotes: 1

Related Questions