IoT is a technological ecosystem that improves people's daily lives by improving productivity, safety, comfort, health, wellness and sustainability. In addition, IoT offers various benefits to different industries such as improved efficiency, productivity and cost savings. However, the increase in the use of IoT has revealed many security vulnerabilities, especially the middleware layer. In this article, we presented possible attacks on availability of middleware layer messaging protocols. We specifically focused on MQTT protocol and conducted a case study. MitM, DoS and BruteForce attacks were carried out in the test environment, the results were shared and the measures to be taken against the attacks were discussed.