Skip to content

v0.8.0

Compare
Choose a tag to compare
@aricart aricart released this 28 Feb 15:20
325bbdd

This release updates the default request-reply strategy to use a single global subscription per client. Instead of creating a subscription per request() or requestOne(), a single inbox with a wildcard subscription is multiplexed for all request-reply operations.

The options of the request() method now support a timeout property. When specified, the timeout defines the number of milliseconds to wait for the specified number of messages (via the max property) or an error is dispatched. If max is not specified the client code is responsible to call unsubscribe() to cancel the internal timeout. As previously if max number of messages or timeout is triggered, the handler for responses is auto-removed.

The client option useOldRequestStyle when set to true, will use the legacy request-reply mechanism of creating a new inbox subscription and publishing a request message per call.