Frequently Asked Questions - Messaging

How to send a message?

Sending messages with mesibo is simple. Just create a MesiboMessage object, set the content (text, binary, rich media), specify user or group recipients, and call send().

That's it. mesibo handles all the complexity behind the scenes - connectivity, reliability, retries, errors, flow control, etc. Messages are delivered instantly if recipients are online. Otherwise, mesibo persists and delivers messages when they next come online. This is automatic and transparent to applications, so applications sending messages do not need to worry if the receiving applications are up and running. Conversely, receiving applications need not worry about the status of the sending application.

We recommend checking Get Started Guide to quickly learn core mesibo concepts.

How do I get the status of a message I sent?

Mesibo informs you in real time about the status of every message sent in Mesibo_onMessageStatus callback.

We recommend checking Get Started Guide to quickly learn core mesibo concepts.

What happens when I send messages to a user who is not online?

mesibo utilizes cut-through switching for real-time message delivery with minimum latency. If the recipient is offline, mesibo will automatically store messages and deliver them once the user comes back online.

However, you can choose not to persist messages by specifying a flag when sending via the real-time APIs. This will skip database storage for scenarios where transient messages are preferred.

What is the retention period of messages stored in the database?

mesibo provides unlimited message retention for active accounts. As long as your account remains active, mesibo preserves all your messaging data reliably. However, individual messages can also be selectively cleared via the backend APIs at any time per your requirements.

How read-receipt works?

mesibo supports read receipts, which notify the sender when their messages are read by the recipient. Apps can enable or disable read receipts based on their own preferences. Users can also control read receipts at an individual level if granular control is preferred.

When enabled, mesibo automatically sends non-intrusive read receipt events back to the sender as soon as the recipient reads the message. No additional effort is required by the receiver. Apps or users can dynamically configure read receipts as needed on a per-message basis or apply blanket policies. This provides flexibility to adapt to different conversation requirements.

What is Message Expiry?

The expiry parameter specifies a delivery deadline for each message. It ranges from immediate (zero) to a few days, configured per message when sending. mesibo will not deliver messages past the set expiry period.

Setting expiry enables real-time as well as time-bound delivery requirements. For example, an expiry of 0 forces real-time cut-through routing to deliver only to online users. Any value greater than 0 sets a maximum time window for delivery guarantees.

Behind the scenes, mesibo retains all messages until they are successfully delivered or their defined expiry period passes - whichever comes first.

Expiry is specified in seconds.

Where are messages stored?

mesibo utilizes three storage layers for message data:

  • Local Device Storage: Messages can be saved locally on each user's device in a database for fast, offline access. This is enabled via the setDatabase() API when initializing mesibo.

  • Server-Side Storage: If a recipient is offline, mesibo will store messages on servers until delivery when the user comes back online. By default, messages are deleted from servers post-delivery unless retention policies are set. Enabling retention saves all communications on servers. If you are hosting mesibo on your servers using mesibo on-premise, all the messages will be saved on your own database.

  • File Storage: All the files your app transfers using mesibo are stored in a file server. The mesibo does not mandate where you store your files. You can store your files on your private file server or AWS, Azure, or any such cloud host. Refer to File Transfer and Hosting page for details.

What should be the cause if my messages are not delivered?

mesibo provides guaranteed, in-order delivery of messages under normal conditions without throttling or drops. However, messages may be discarded in certain cases:

  1. Sending with a short expiry value. The message will be discarded if the recipient is not online before the expiry of the message
  2. Messages with zero message ID will be discarded if the recipient is not online
  3. Invalid destinations such as unknown users, groups, or non-group members
  4. Potential throttling on mesibo cloud for excessive failures/flooding.
  5. On the client side, outgoing messages are stored locally to retry sending later. But if the local database is not enabled and the app terminates, pending sends will be lost.

If you think none of the above is the cause, you can use webhook or on-premise deployment to diagnose the issue.

  1. Configure webhook to be invoked for all the failed messages. If your message has reached the mesibo server and was not delivered, you should know about it in the webhook payload. If the message was not delivered, nor the webhook was invoked, you should check the client side.

  2. Alternatively, if you are using mesibo on-premise, enable message retention. This will allow you to verify if your messages are reaching your on-premise mesibo server.

If the issue persists, report mesibo support with the results of the above-mentioned procedure.

Can I schedule messages ?

Yes, you can use the backend API to schedule messages. Refer to the when parameter in the message API.

Does mesibo supports typing indicators and presence information?

Yes, mesibo has full support for typing indicators to display when users are actively typing messages. Beyond that, mesibo enables sending and receiving a wide range of presence information like online status, join/leave events, and any other custom app-specific status.

You can leverage these capabilities to build a rich real-time presence for things like typing, availability, attendance, roles, modes, etc. Presence data and events are delivered instantly using mesibo's real-time architecture just like messages, with efficient delivery and battery-optimized APIs.

For specifics, refer to the mesibo Presence APIs documentation where capabilities like typing indicators are covered in detail with examples. The system provides an extensible framework to customize presence based on the real-time situational context needed by your app and users.

How do I know Online, Offline, and the last seen Status of a user?

mesibo provides a profile.lastSeeen() API which allows users to see when a user was last online and actively using the app. Depending on your app's privacy requirements, you can entirely disable this feature or reduce the accuracy of the last seen to protect the privacy of the user.

The interpretation of Online and Offline status varies from one app to the app. For some apps, it's when the user was last connected, and for other apps, a user is considered online when actively using the app while being connected. By default, mesibo considers a user online when the app is foregrounded and actively used. Connection status alone does not signify online. Refer to the Online Modes documentation to configure based on your requirements.

Both Android and iOS will suspend the app after the app moves to the background. Hence, most users are Offline unless they are actively using the app. When you send a message, a push notification will wake them up, and the app may be online momentarily. This still does not mean that the user is actively using the app since the message was delivered when the app was in the background. mesibo considers various criteria to determine the correct online status.

Does mesibo support non-English/Asian/European languages?

Yes, mesibo is based on Unicode and hence supports all languages, fonts, and emojis.

Is it possible to deliver messages via email?

You can use a webhook to deliver your messages to email or any third-party channels. When a message arrives, mesibo can invoke your webhook depending on the settings you have selected in the mesibo console. You can then send emails from your webhook to your users.

I am creating a social app. How do I allow only matched or paired users to communicate?

This is a common requirement in many social applications. For instance, for a dating app, you might permit two users to interact only if they've matched, and not otherwise. Furthermore, you need to break the communication if they choose to unmatch. Additionally, you may even configure users to allow messaging but not calls unless they are premium users.

mesibo allows you to restrict user communication in various ways. For more information, refer to the Restricting Communication Audience.