VirtualBox, Solace Systems Virtual Message Router and SolCache

"Solcache is a scalable, in-memory message cache for Direct messaging that allows clients using Solace messaging APIs to request the most current messages for a topic of interest when they come online, or when they start subscribing to topics that they were not originally subscribed to." -- Solace_SolCache_Guide_R71_Iss01.pdf page 15.This post is about how to configure Solcache and SolAdmin alongside a Solace Systems Virtual Message Router.  This is useful for development purposes where you want to work on code using the Solace Systems APIs but may not have access to a physical Solace Systems appliance at all times.  Note that this is not a configuration that is recommended for use in a production environment. The configuration below for Solcache is viable for production usage.
  1. Install VirtualBox on your preferred OS.
  2. The VMR is distributed as a VMR so must be imported into VirtualBox 
  3. Within VirtualBox configure the VM running the VMR to use the bridged adapter
  4. Install CentOS 6.6 on another VirtualBox VM and configure this VM to use the bridged adapter.  This will be used to run Solcache, hereafter this VM will be referred to as the Solcache VM
  5. Install SolAdmin on your local PC
  6. Configure SolAdmin to communicate with the VMR (IP address, port number - default is 8080, username and password).
  7. Start the VMR VM and login.
  8. Start the Solcache VM.
  9. Configure the SolAdmin user interface to manage the VMR
  10. Deploy the components to the Solcache VM as stated in "Solace_SolCache_Release_Notes_R71036_Iss01.pdf"
  11. Start the Solcache instance on the Solcache VM.
  12. One little gotcha if you are not a regular Linux user - run the command ifup eth0 from the command line to ensure that the Ethernet adapter is started.
  13. In order to configure Solcache you really need to read the documentation!
  14. Write some code in one of the supported languages that publishes to a specific topic in Solace Systems usage such as my/topic/and/subtopics/>. 
  15. Configure Solcache using SolAdmin to cache my/topic/and/subtopics/>
  16. Publish to the configured topic when Solcache is running
  17. Write code to subscribe to Soltr and you should see that, with the correct parameters (for the cacheSession.sendCacheRequest you have to use solace.CacheLiveDataAction.FLOW_THRU as the 4th parameter)
  18. You will now see that if you subscribe to the Solace Systems device even if there is no data published to my/topic/and/subtopics/> at the time you subscribe you will instead receive the last published values from step 16.
In summary, Solcache+SolaceSystems+SolAdmin is a solid solution for large scale message based system design with caching.