Industry 4.0 relates to the digital revolution of manufacturing and other markets such as retail, distribution, oil and gas, and infrastructure. On the other hand, the Industrial Internet of Things (IIoT) is a technological advancement that leads to Industry 4.0 implementation by boosting the manufacturing sector's productivity and economic impact. IIoT provides the ability to provide global connectivity between components in different locations. The manufacturing sector has had various difficulties implementing IIoT, primarily due to IoT characteristics. We offer an in-depth review of Industry 4.0 and IIoT in this survey. The primary motivation behind this survey is to introduce the most recent advancements related to Industry 4.0 and IIoT and to address the existing limitations. First, we provide a novel taxonomy of IIoT challenges that includes aspects of each challenge, such as the terminology and approaches utilized to solve these challenges. Besides IIoT challenges, this survey provides an in-depth demonstration of the many concepts related to IIoT, such as architecture and use cases. Second, the study provides a comprehensive review to study the state-of-the-art of Industry 4 in terms of concepts, requirements and supporting technology. In addition, we discuss the correlation between enabling technology and technical requirements in detail. Finally, our survey targets deep learning, edge computing, and big data as key techniques for future IIoT. Furthermore, the presented technique is thoroughly examined to present a different method for future adoption. Additionally, to the proposed technique, we propose a new architecture for the future of IIoT based on three primary techniques.