Publish/Subscribe Middleware for Resource Discovery in MANET Recently, mobile ad hoc networks (MANETs) have received a lot of attention and can be used effectively for fast resource sharing due to their flexibility, self-organization and simple implementation. However, resource discovery is an important and challenging issue in mobile ad hoc networks because of their dynamic nature, topology variations and limited resources. In this paper, we propose a middleware architecture based on the publish-subscribe system that can be used to discover and locate of resources in mobile ad hoc networks. This middleware provides capabilities to adjust Quality of Service, load balancing and prioritization and can work well under broker failures. The simulation results show that our approach significantly reduces message cost and discovery delay, while improving resource availability.