Publishing of messages to Event Broker failing when using Rest messaging Post

Our client application is publishing around 5000 messages to the Solace PubSub+ Event Broker (part of Integration Suite AEM) at one go using Rest Messaging Post API. The messages are published to a topic.

However of the 5000 odd messages, some 2000+ messages are failing with a 503 “Solace-Error-Response” message being received in the client application and are not received into the queue subscription at the event broker. Remaining messages are received in the topic/Queue.

We have enabled Guaranteed messaging in the Event Broker. Not sure if this has anything to do with the Rest message failures?

Appreciate any inputs to suggest how this issue can be resolved?

Best regards,
Srinivas

Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:

Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.

AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a :+1:. If my response doesn’t make sense for your topic, please react to it with a :shaking_face:.

Looking at the documentation, I can help explain how to handle REST messaging failures with 503 errors when publishing messages.

The 503 error code can occur for several reasons when publishing messages:

  1. Message VPN Unavailable - This occurs when the Message VPN is shutdown or unavailable
  2. Spool Over Quota - When the Guaranteed Message spool exceeds its allocated space quota
  3. Queue Shutdown - When attempting to operate on a shutdown queue
  4. Service Unavailable - When Guaranteed Messaging service is not enabled on the event broker

For the specific case of publishing 5000 messages and getting 503 errors, the most likely cause is spool over quota, which happens when too many messages accumulate in the broker’s message spool.

To resolve this, you have a few options:

  1. Implement a retry mechanism with backoff when receiving 503 errors
  2. Reduce the publishing rate to allow the broker to process messages
  3. Monitor broker resources and spool usage
  4. Consider using back-pressure handling in your publisher implementation

The documentation recommends implementing proper error handling and retry logic rather than simply discarding messages on failure.

Relevant documentation: