Closed primemb closed 1 year ago
No you don't need to set an expiration when sending the request. If there is no response after timeout
milliseconds then the promise is rejected
const timer = setTimeout(() => {
dfd.reject(new AMQPError('RPC_TIMEOUT', 'RPC response timed out'))
this._requests.delete(id)
}, timeout)
Any number of things could have happened to the message at this point, but any response after the timeout will be discarded. What could happen to the request message:
Hi, i want to ask how timeouts work in rpc client this is my code right now :
so do i need to set
expiration
in send method? or just settimeout
in createRPCClient is enough. what happend for message after it timeouts in rpc client?