MQTT is the protocol of choice for M2M and IoT Applications.
Mosquitto is an open source iot.eclipse.org project. It implements the MQTT protocol versions 3.1 and 3.1.1. For more details please refer to http://mosquitto.org/.
We would look at setting up the broker both on Raspberry Pi and an Ubuntu VM on PC.
Though some special configuration is needed to begin with using the VM.
We would be using the Virtual Box as the easy choice.
Make sure to follow the NAT tutorial for local network access on the PC.
As VM to PC connectivity is needed between the guest and host OSs.