Try PubSub+
If you haven't already, check out our new Developer Portal! You'll find useful information about Solace PubSub+ as well as handy resources to get you started.

JCSMPXMLMessageProducer - handling unsolicited CloseFlow exception from appliance

TimHTimH Member Posts: 3

What is the recommended approach for handling com.solacesystems.jcsmp.JCSMPTransportException: Received unsolicited CloseFlow for producer (503:Service Unavailable)?
I have infinite reconnect retries configured in channel properties so was expecting reconnection to occur when the appliance came back up, but this doesn't seem to happen.
channelProperties.setReconnectRetries(-1);

Tagged:

Comments

  • VvTVvT Member, Employee Posts: 6

    Hi, Do you have redundancy configured and what is your application redundancy configuration - active/active or active/standby? Do you have in the connection hosts all the server IPs for the redundancy pair? Do you see in the java console/log whether the API is trying to reconnect and to which broker? Those should help you detect the problem. Normally, since you're setting the reconnectRetries to -1, the API should try to reconnect. Here is a document explaining how it works and which parameter does what:
    https://docs.solace.com/Solace-PubSub-Messaging-APIs/API-Developer-Guide/Configuring-Connection-T.htm#contentBody

  • TimHTimH Member Posts: 3

    Hi, I have obtained further information from our local Solace administrator regarding this issue. It seems as part of change to upgrade a disk array for the appliance in question, the message spool on the appliance was restarted. This must have caused the com.solacesystems.jcsmp.JCSMPTransportException: Received unsolicited CloseFlow for producer (503:Service Unavailable) exception seen on our clients. However, as the connection to the appliance was still active, there was no reconnection required.

    So my question is, what would be the recommended approach on receiving this exception? Attempt to re-create the flows that have been closed?

  • VvTVvT Member, Employee Posts: 6

    Yes, an attempt to re-create the flows should work. In your case, the broker keeps the connections open (since the message spool restart doesn't affect direct messaging) but the guaranteed message flows were closed due to the message spool being restarted.
    You can refer to the following page on how to utilize the flow creation and the FlowEventHandler:
    https://docs.solace.com/Solace-PubSub-Messaging-APIs/API-Developer-Guide/Creating-Flows.htm

  • TimHTimH Member Posts: 3

    Ok, will aim to do that then! Thanks for the help.

Sign In or Register to comment.