Search code examples
gradleintegrationsolace

How to retrieve all the messages present in the solace queue


I want to know how do I retrieve the messages already present on the Solace Queue. I am able to send and receive the messages I created from my machine but can't receive any messages that are already present in the queue. I want to retrieve the messages and store it in a text file.

I am sending my messages by integrating Solace APIs in Gradle and writing code in Java. Can anyone guide me regarding the same?


Solution

  • 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.