0

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?

  • What is the exact error you're getting when you say you "can't receive any messages [...] in the queue"? You won't get in-depth answers unless the question is more specific. – Wai Leong Jan 26 '17 at 00:55

1 Answers1

0

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.

Wai Leong
  • 328
  • 2
  • 7
  • Now, I am able to receive messages from the queue but I am not able get all the messages in the queue. According to the the queue there are about 150 messages spooled but I only receive less than 15 messages every time I run my code. Can this be resolved? Can I get all the messages that are spooled in the queue? – Harish Vaibhav Kali Jan 27 '17 at 16:21