I need to control different devices (fans) containing NodeMCUs through Android Application using MQTT broker.Android application will communicate with the fan through MQTT broker.Please guide how can I make sure that a specific message is sent and received by a specific fan.
I suggest you start to look at what sort of topic scheme you intend to use with MQTT.
Rather than including the target device identifier (e.g. MAC address) in the message body, if you use that as a level in the topic structure you can achieve your goal of directing messages only to the required device without any need for a server/broker side application.
e.g.
[mac address]/command