There's an exact tutorial for this.
If you had downloaded the Solace Java JAR via the Maven links, you might have missed the entire suite, which contains all the dependent JARs distributed by Solace, API reference docs, as well as a bunch of samples. The latter is in addition to what you may find on http://dev.solace.com/get-started/java-tutorials/. Get the entire ZIP file, as well as the Release Notes, from http://dev.solace.com/downloads/.
There are multiple possibilities why you cannot receive messages from a queue:
- Queue name is misspelt.
- Queue permissions are wrong.
- Queue is shut down on the egress.
- Message spool is not active on the router.
- Client profile is set not to receive Guaranteed Messages.
- Number of egress flows has exceeded the router / message-vpn limit.
- Bind count on the queue has exceeded.
- The egress flow is not active.
- Client is not connected to the router.
- ...
Examining the error / exception will give you information why you cannot receive messages.