I want to make a forum using backendless, but I'm not sure how to do it

I’m developing an app for my degree , and I want to make a forum using backendlesss,
I think that the best way to it is storing forum messages as Data objects.I have a table Messages, every row in this table is a message. and when user posts message I execute “save” to Messages table. When users read messages I execute “find” on table Messages.
Imagine that the body of messages is a scrollview for example and I send a message, it means as I said I store it in backendless table (the way to do that is simple with backendless API,I’ve already done that many times) , but how does the other users who are in the forum see that message in real time similar to whatsapp, facebook posts ,etc.?
Thanks a lot.

how does the other users who are in the forum see that message in real time similar to whatsapp, facebook posts ,etc.?

That could be done with code which periodically checks if there are new messages and if there are any, they would be loaded and shown to the user.

Thanks for your response, but I wonder if I can do it with Messaging Publish Documentation for Android , I’ve been reading it and I think it’s possible , please let me know if I’m right.

Thanks a lot

Thanks for your response, but I wonder if I can do it with Messaging Publish Documentation for Android , I’ve been reading it and I think it’s possible , please let me know if I’m right.

Thanks a lot

I use Messaging/subscription to implement chat, to receive a chat message as soon as the other user sends it, i.e. in real time. You have to figure out how to subscribe users to that forum topic, publish to that subtopic, channel, or whatever method you use. Just make sure you unsubscribe appropriately when needed

Messaging may work, however, Backendless keeps messages only for a few minutes. You can override this behavior with custom business logic and persist messages in a data table. That way you get the benefit of more real-time delivery and retrieval of messages from the past.

Oh yes, I forgot to mention that I’m storing individual messages in a “messages” table. But instead of doing a check on the table for new messages, I do the following when sending a message: save the message object in the table then publish a message. The receiver gets the message in real time if the chat window is open by using subscriptions, however when the window is closed and opened at a later time, I’m just pulling all related messages from the table. This might not be the most efficient way of doing it but it’s working for my use case

Thanks Ali Adel, now I have a better idea to implement what I want.

Thanks to you all for your suppport, I’ve been exploring business logic and I found the option “before publish” and “after publish” as Mark said to keep messages more time , but doesn’t it the same if I use deliveryoptions and I use it as parameter in Backendless.Messaging.publish… ?

The DeliveryOptions object does not contain any logic to persist the messages. Can you please explain what you mean?