A lot of communication protocols have been developed to support the efficient communication of the Industrial Internet of Things (IIoT) devices. These kinds of applications are intended to run with constrained resources. However, the selection of a standard and effective industrial messaging protocol is a challenging task for any shop floor integration because it depends on the nature of the IoT system and its messaging requirements. In this paper, two IoT protocols like Advanced Message Queuing Protocol (AMQP) and Constrained Application Protocol (CoAP) are compared using a low-cost hardware device for factory integration. The results show that the CoAP protocol is designed to be so small that it fits inside a microcontroller, but it can be fully applied in cyber-physical environments, in another aspect the AMQP protocol is more complex, there is no official support and you need bigger installation packages; but it provides a higher communication speed.