🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

Send does not work, gives WaitingForDNS error yet connect() doesn't fail

I'm not sure whether my earlier post was misplaced, hopefully this is a better place.

I'm trying to do a pub/sub tutorial, both publishing 1 message and subscribing to the queue. The original JS code as Solace created on Github. I'm trying to Typescript-ify the code and now it says

OperationError: Cannot perform operation SEND while in state WaitingForDNS

PING resolves the host URL to an IP address, so at the very least, this message is misleading.

This happens on a session.send(solaceMessage);

The session.connect() call, however, does not throw an exception. However, if there really was a DNS issue, it should have happened at that point.

Answers

  • giri
    giri Member, Administrator, Employee Posts: 116 admin

    Hi @benprachtrsi, I think this is a duplicate of another thread you opened on this topic. Did you get a chance to review @Tamimi 's response to check for the UP_NOTICE before attempting to send a message?

    Can you attempt to register an event listener for the UP_NOTICE event and execute your publish command after that?

    The other thread has a good discussion around this - let us track it there. Hope that should be fine!