Issue with Solace Consumers
Hy Folks, I have a scenario where my App has multiple consumers and Publishers, Publishing part is working fine but my consumers are behaving weirdly, It stops consuming messages after some time, when I check from portal it shows my Consumers are active and connected to the queue but messages sit in the queue and does not get consumed, If I restart the app, It starts working fine again and consumes the messages. The fun part is that logs are not helping at all and I am clueless about whats going on..
need expert suggestion.
Answers
-
Below is my reconnection logic with Solace
return JCSMPFactory.onlyInstance().createSession(properties, null, new SessionEventHandler() { @Override public void handleEvent(SessionEventArgs event) { // could be reconnecting, connection lost, etc. try { log.info("Reconnecting to Solace ...."); String newToken = solaceProperties.getIdentityClientId() != null ? solaceTokenCache.getAuthToken() : solaceAccessToken.getNewAccessToken(); log.info("Solace: New token : {}", newToken); session.setProperty(JCSMPProperties.OAUTH2_ACCESS_TOKEN, newToken); log.info("Solace session event: {}. Reconnected with a new token", event); } catch (Exception e) { log.error("Exception occurred during session event handling: {}", event, e); } }
I only get the logs uptil
log.info("Solace: New token : {}", newToken);
which means its generating the new token but after that
log.info("Solace session event: {}. Reconnected with a new token", event);
this log is not coming and it also doesnt go to the catch block,
i hope this gives more context on the issue0