In spite of my having looked at Arduino Yun’s bridge I couldn’t come up with a way of connecting PubSubclient to the Yun. An important hint by Nick O’Leary earlier today made it ‘click’ into place.
Instead of doing this with EthernetClient, on say, a Duemilanove with an Ethernet shield:
you do this with the Yun:
The bridge opens the connection to the outside world from the Arduino via the OpenWRT host.
Here’s a Yun subscribed to an MQTT topic which reads numbers and writes them
to a 7-segment display.
Once you know that, it’s easy. Even so, it’s probably much more sensible to run a full MQTT client on the OpenWRT part of the Yun (even a full-blown Mosquitto if you like).