mqtt library which support softwareSerial on arduino uno with ESP8266
In order to use the ESP8266 WiFi module with pubSubCient, you need a library that interfaces with the module with the usual AT commands, while presenting an Arduino Client interface on the surface. A while back, I found this library after a great deal of searching. It supports SoftwareSerial as well as HardwareSerial objects. Its ESP8266 interface provides the standard Client methods of write(), read(), connected(), etc. There are some issues, of course, but its the best I've found so far. You can pass the created Client object to the pubSubClient constructor and you're good to go.