Messagebox Service
Overview
The "Messagebox" service is an MCL-Mobility Platform service designed to serve as an intermediary between external back-ends and the mobile applications of the devices for message exchange. In other words, the "Messagebox" service allows the MCL applications installed in the devices to send messages to an external back-end and receive messages from the external back-end through the MCL-Mobility Platform.
In terms of device Operating System, if you are using Android devices, the "Messagebox" service will ONLY be compatible with Android 5 or higher.
This service is based on message queuing - the sender (mobile application/device or external back-end) sends a message to a specific queue and the receiver (mobile application/device or external back-end) retrieves that message because it is constantly polling that queue.
Each specific queue is referred to as "Topic". In this case, a topic is similar to a mailbox, the sender uses a specific topic to relay a message to a receiver it knows has subscribed to that topic and will get that message. The necessary topics are created/managed in the "Messagebox" sub-module ("Control Panel" > "Data Sync" module > "Messagebox" sub-module) which is available at account level and in every site's Site Dashboard. See Messagebox.
Topics
There are 3 possible directions (sub-services) available within the "Messagebox" service which result in 3 types of topics:
Mobile to External Back-end - the mobile application/device sends a message to a specific topic intended for the external back-end.
External Back-end to Mobile - the external back-end sends a message to a specific topic so it is picked up by the intended mobile application(s)/device(s).
Request - The mobile application/device sends a message to a specific topic, waits for the intended external back-end to retrieve it and post a response into that same topic and, then, gets/reads that response.
Message Flow
•The "Messagebox" service can accommodate a Single Back-end Instance (devices from one or more sites post messages in specific topics to a single external back-end) or a Multiple Back-end Instance (two or more external back-ends receive messages from one or more sites through the intended topics).
✓There is only ONE external back-end/instance and ONE site with multiple devices associated to it.
✓The devices/MCL applications post 4 messages to the "General" topic (available in the "Messagebox" service) which is associated to the target external back-end, meaning, the external back-end is constantly polling this topic so it can read the messages meant for it.
✓The messages posted in the "General" topic have a 24-hour window to be read by the external back-end. If, for some reason, the external back-end does not read/retrieve one of the messages within the 24 hours, that message will be deleted from the "General" topic.
✓There are TWO external back-ends/instances with multiple devices from several sites.
✓The "Messagebox" service in MCL-Mobility Platform includes TWO topics, each one targeting its own external back-end.
✓The devices from each site post messages onto the corresponding topic which are being polled by the respective external back-end.
✓The messages posted into the topic "DeliveryConf" have a 24 hour lifetime - the external back-end has 24 hours to read the messages (from the time they are posted) before they are deleted.
✓The messages posted into the topic "DeliveryExcept" have a 48-hour window to be read by the intended external back-end. After that, they are deleted.
•An external back-end can post messages onto a topic with a specific receiver (the target topic).
✓There is only ONE external back-end/instance and TWO topics ("Route 123" and "Route 456") each with a device associated to it.
✓The purpose is to send specific messages to the target devices/MCL applications.
✓The external back-end posted 4 messages, 2 for each site in the corresponding topic. The messages are retrieved by the intended devices/MCL applications.
✓The device/MCL application associated to "Route 123" has 24 hours to retrieve/read the messages posted in "Route 123". Each message queues for 24 hours and, then, it is deleted.
✓The messages posted in "Route 456" have a 30 minute window to be read by the devices/MCL applications from "Route 456" before they are deleted.
✓There is only ONE external back-end/instance and THREE devices/MCL applications that retrieve the next available message from one topic.
✓The purpose is to send messages to the topic and have the devices/MCL applications retrieve these messages when they need them (ex: start of a new job)
✓The messages were available for 5 days to be read/retrieved by all the devices/MCL applications. After that, they were removed from the topic.
Message Content
The typical message includes headers (business information such as sender identification, timestamp, assignment ID, etc. ) and a body with actual content.
The body can consist of text or binary data.
Each message can have up to 10 headers and 1 body.
"Messagebox" Service Limits
Each message can have a size of up to 1 MB.
An MCL-Mobility Platform account can contain up to 1000 topics.
Usage
Be aware that you must have a compatible back-end profile within your MCL-Mobility Platform account (= a back-end profile that includes the "Messagebox" service and is associated to the intended site or to all the sites, as required) so it can be applied to your back-end requests. See Back-end Profiles.
MCL Technologies provides an MCL.Net Library to be integrated in your back-end application(s). You can download it from our Knowledge Base.
Make sure you register/log in to our MCL Community to access the Knowledge Base.
Feel free to contact MCL Support for more information.