The Internet of Things has ushered in a new era of energy efficiency, enabling the deployment of energy-efficient sensors for energy conservation and resource utilization. Managing and harnessing real-time streaming data generated by IoT devices is a significant challenge for developers. A simple solution to this challenge is presented, demonstrating how MongoDB and HiveMQ can be integrated to enable seamless real-time energy monitoring in smart buildings. This integration optimizes energy management and unlocks the potential for efficient energy conservation and a sustainable future. By combining HiveMQ's MQTT broker with MongoDB, developers can efficiently handle data transmission, ingestion, and storage, enabling building managers to gain valuable insights into energy consumption patterns and make data-driven decisions.