MQTT for GSM modules

Can we use pubsubclient library for mqtt connection in gsm modules like A7? If yes provide the code…if no please provide the alternative code for mqtt in GSM…