- Fix
AwaitableSender.send()to reject with a clear error when the sender link is closed (e.g. due to a disconnection) while sending, instead of failing with a generic operation timeout. - Update minimum supported Node.js version to 22.x. Node 16, 18, and 20 are no longer supported.
- Upgrade TypeScript to 6.0 and switch
moduletonodenextto remove auto-generated/// <reference types="node" />directives from typings. - Update
@types/nodeto ^22.0.0.
- Release the resources if
Session.createReceiver()rejects due to timeout.
- Set the max listener limit to 1000 for
RheaConnection
- Fix a bug where
Connectionconstructor isn't settingoperationTimeoutInSecondscorrectly.
- Update
rheadependency to the 3.x major version. - Update dev dependency
typescriptto~4.3.0
- rhea has one breaking change introduced in version 3.x that impact this library: The TLS options type to
Container.listen()now requires atransportproperty which is either "ssl" or "tls".
- Exposes a new
receiver.drainCredit()method that calls through to rhea'sreceiver.drain_credit()method. - Update rhea minimum version to 2.0.3
- Updates rhea dependency to the 2.x major version, and the tslib dependency to the 2.x major version.
- Adds
CreateRequestResponseLinkOptionsas an exported interface.
- rhea has 1 breaking change introduced in version 2.x: timestamps are not deserialized as Date objects instead of numbers.
- Updates
AwaitableSendOptionsto include the optional fieldstagandformatwhich were previously passed toAwaitableSender.send(). These fields are no longer positional arguments onAwaitableSender.send(). - Adds
SenderSendOptionsto include the optional fieldstagandformatwhich were previously passed toSender.send(). These fields are no longer positional arguments onSender.send(). - Removes
sendTimeoutInSecondsfrom theAwaitableSendOptionsthat is passed to theAwaitableSenderconstructor.timeoutInSecondsonAwaitableSenderOptionscan still be used to set the timeout for individualAwaitableSender.send()invocations. - Renames the following TypeScript interfaces to better match the methods they apply to:
- SenderOptionsWithSession -> CreateSenderOptions
- AwaitableSenderOptionsWithSession -> CreateAwaitableSenderOptions
- ReceiverOptionsWithSession -> CreateReceiverOptions
createSession,createReceiver, andcreateSendermethods now only close underlying rhea analogue when cancelled if the resource has already been opened.
- Exposes the
incominggetter on theSessionthat lets accessing size and capacity of the incoming deliveries #79. - Updates the error message for the
AbortErrorto be a standard messageThe operation was aborted..
- All async methods now take a signal that can be used to cancel the operation. Fixes #48
- Added a
timeoutInSecondsparameter to thesendmethod on theAwaitableSenderthat overrides the timeout value for the send operation set when creating the sender. - When the
errorevent is fired when closing the sender/receiver link, surface errors occurring on the sender/receiver context if none are found on the session context. Details can be found in PR #55 - Updated minimum version of
rheato^1.0.24. Details can be found in PR 68
- Updated minimum version of
rheato^1.0.8. - Added a read only property
idto theSessionobject. The id property is created by concatenating session's local channel, remote channel and the connection id"local-<number>_remote-<number>_<connection-id>", thus making it unique for that connection. - Improved log statements by adding the session
idand the sender, receivernameto help while debugging applications. - Added
optionstoLink.close({closeSession: true | false}), thus the user can specify whether the underlying session should be closed while closing theSender|Receiver. Default istrue. - Improved
openandcloseoperations onConnection,SessionandLinkby creating timer in case the connection gets disconnected. Fixes #41. - The current
Senderdoes not have a provision of "awaiting" on sending a message. The user needs to add handlers on theSenderforaccepted,rejected,released,modifiedto ensure whether the message was successfully sent. Now, we have added a newAwaitableSenderwhich adds the handlers internally and provides an awaitablesend()operation to the customer. Fixes #45. - Exporting new Errors:
InsufficientCreditError: Defines the error that occurs when the Sender does not have enough credit.SendOperationFailedError: Defines the error that occurs when the Sender fails to send a message.
- Export rhea types for
Typed. PR. - Export rhea types for
WebSocketImplandWebSocketInstance. PR. - When opening a connection fails with no error, use standard error message. PR.
- Allow websockets usage on a connection without creating a container first. PR.
- New function
removeAllSessions()on the connection to clear the internal map in rhea to ensure sessions are not reconnected on the nextconnection.open()call. PR. - Remove all event listeners on link and session objects when
close()is called on them. PR
- Throw
OperationTimeoutErrorwhen a Promise to create/close an entity is rejected.
- Fix a minor bug in receiver creation.
- Added checks for some event handler methods to exist before logging information that uses node's event handlers inbuilt functions.
- Improved error checking while creating the receiver.
- Provided an option to add an event handler for "settled" event on the Receiver.
- With the usage of
importHelpers, the tslib will be needed in package.json for installers using older versions of npm (or using yarn). PR.
- Allow setting drain property on the receiver PR.
- Fixed a bug while populating the connectionId PR.
- property
actionInitiatedis now of typenumberwhich is incremented when thecreate,closeaction on an entity is under process and decremented when the action completes (succeeeded or failed).
- Improved log statements for better debugging.
- Any type of
errorevent will be emitted with a tick delay. This would give enough time for thecreate()methods to resolve the promise. - Added a new
booleanpropertyactionInitiatedwhich indicates whether thecreate,closeaction on an entity is under process.
optionsis a required property ofConnectionandContainer.
- Transform relevant objects in rhea EventContext to rhea-promise objects.
- Ensure that
container.createConnection()creates a connection on that container and not on the default container.
- TS target to ES2015. This should help us support node.js version 6.x and above.
- Update homepage, repository and bug urls in package.json
- Initial version of rhea-promise.