A computer implemented method comprising: under control of a computer hardware processor configured with specific computer executable instructions, receiving, by a gateway , from a first Internet of Things (IoT) device , a first message at a sub-application communication layer, the first message indicating a first endpoint which is a destination that the first IoT device communicates with; determining, by the gateway , that the first endpoint is associated with custom processing logic; in response to determining that the first endpoint is associated with the custom processing logic, applying, by the gateway , the custom processing logic, wherein the execution of the custom processing logic alters processing behavior that is different than behavior of default processing logic; and transmitting, by the gateway , at the sub-application communication layer, a second message to the first IoT device based at least in part on the execution of the custom processing logic; wherein determining that the first endpoint is associated with the custom processing logic further comprises: determining that the first endpoint is configured to support customized fragmentation, and wherein applying the custom processing logic further comprises: extracting a custom fragmentation length from the first message; and processing the custom fragmentation length. under control of a computer hardware processor configured with specific computer executable instructions, receiving, by a gateway , from a first Internet of Things (IoT) device , a first message at a sub-application communication layer, the first message indicating a first endpoint which is a destination that the first IoT device communicates with; determining, by the gateway , that the first endpoint is associated with custom processing logic; in response to determining that the first endpoint is associated with the custom processing logic, applying, by the gateway , the custom processing logic, wherein the execution of the custom processing logic alters processing behavior that is different than behavior of default processing logic; and transmitting, by the gateway , at the sub-application communication layer, a second message to the first IoT device based at least in part on the execution of the custom processing logic; receiving, by a gateway , from a first Internet of Things (IoT) device , a first message at a sub-application communication layer, the first message indicating a first endpoint which is a destination that the first IoT device communicates with; determining, by the gateway , that the first endpoint is associated with custom processing logic; in response to determining that the first endpoint is associated with the custom processing logic, applying, by the gateway , the custom processing logic, wherein the execution of the custom processing logic alters processing behavior that is different than behavior of default processing logic; and transmitting, by the gateway , at the sub-application communication layer, a second message to the first IoT device based at least in part on the execution of the custom processing logic; wherein determining that the first endpoint is associated with the custom processing logic further comprises: determining that the first endpoint is configured to support customized fragmentation, and wherein applying the custom processing logic further comprises: extracting a custom fragmentation length from the first message; and processing the custom fragmentation length. extracting a custom fragmentation length from the first message; and processing the custom fragmentation length. <EOS>