A mission critical environment (MCE) consists of errorprone, highly variable, and highly rate limited communication channels. Paradoxically, this substantially increases the need to perform optimal task allocation (OTA), while at the same time making it much harder to perform OTA efficiently. To simplify the problem, we consider OTA for publish/subscribe-based MCE since it has unique characteristics such as high level publish/subscribe node and task differentiation and high scalability. In this work, we formulate the OTA problem for publish/subscribe-based MCEs, propose an architectural framework and distributed communication protocols emphasizing the unique challenges of MCE. We adopt wellknown Hungarian method and Rectangular Assignment algorithm to solve OTA problem in publish/subscribebased MCE in polynomial time. Through simulations, we evaluate the performance of our proposed system for multiple publish/subscribe scenarios. Our results indicate that our proposed solutions achieve the goal of OTA in highly dynamic environments, with low processing time and communication overhead.