Solace Community is getting a facelift!
On March 3rd we will be starting the process of migrating Solace Community to a new platform. As a result, Solace Community will go in to a temporary read-only state. You will still be able to come onto Solace Community and search through posts to find answers, but you won't be able to ask questions, post comments, or react in any way.
We hope to have the migration complete by Wednesday March 5th (or sooner), so please keep an eye out!
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
-
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!
0