You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix issues with replying to RPC messages using Promises (#44)
* Fix issues with replying to RPC messages using Promises
Issue 1: If a message is received with the replyTo field set (an RPC
message) and the onMessage function that's passed to activateConsumer()
or startConsumer() returns a Promise and the Promise isn't an ES6
Promise, a JSON version of the Promise itself may be returned in the
reply message instead of the Promise's resolved value.
https://stackoverflow.com/questions/27746304/how-do-i-tell-if-an-object-is-a-promise
Issue 2: If a message is received with the replyTo field set (an RPC
message) and the onMessage function that's passed to startConsumer()
returns a Promise, the Promise's resolved value isn't returned in the
reply message. Instead a JSON version of the entire Promise is returned.
* Rebuild transpiled library from Typescript source
Update version information in package file to match latest released version
* Allow the onMessage callback that's passed to activateConsumer() and
startConsumer() to return a promise regardless of whether or not the
replyTo field is set.
startConsumer() can automatically ack the message. If noAck == false and
manualAck == false and onMessage returns a promise, wait until the
promise is resolved before acknowledging the message.
* Rebuild transpiled library from Typescript source
0 commit comments