- Fix a bug where
Connection
constructor isn't settingoperationTimeoutInSeconds
correctly.
- Update
rhea
dependency to the 3.x major version. - Update dev dependency
typescript
to~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 atransport
property 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
CreateRequestResponseLinkOptions
as an exported interface.
- rhea has 1 breaking change introduced in version 2.x: timestamps are not deserialized as Date objects instead of numbers.
- Updates
AwaitableSendOptions
to include the optional fieldstag
andformat
which were previously passed toAwaitableSender.send()
. These fields are no longer positional arguments onAwaitableSender.send()
. - Adds
SenderSendOptions
to include the optional fieldstag
andformat
which were previously passed toSender.send()
. These fields are no longer positional arguments onSender.send()
. - Removes
sendTimeoutInSeconds
from theAwaitableSendOptions
that is passed to theAwaitableSender
constructor.timeoutInSeconds
onAwaitableSenderOptions
can 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
, andcreateSender
methods now only close underlying rhea analogue when cancelled if the resource has already been opened.
- Exposes the
incoming
getter on theSession
that lets accessing size and capacity of the incoming deliveries #79. - Updates the error message for the
AbortError
to 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
timeoutInSeconds
parameter to thesend
method on theAwaitableSender
that overrides the timeout value for the send operation set when creating the sender. - When the
error
event 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
rhea
to^1.0.24
. Details can be found in PR 68
- Updated minimum version of
rhea
to^1.0.8
. - Added a read only property
id
to theSession
object. 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
id
and the sender, receivername
to help while debugging applications. - Added
options
toLink.close({closeSession: true | false})
, thus the user can specify whether the underlying session should be closed while closing theSender|Receiver
. Default istrue
. - Improved
open
andclose
operations onConnection
,Session
andLink
by creating timer in case the connection gets disconnected. Fixes #41. - The current
Sender
does not have a provision of "awaiting" on sending a message. The user needs to add handlers on theSender
foraccepted
,rejected
,released
,modified
to ensure whether the message was successfully sent. Now, we have added a newAwaitableSender
which 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
WebSocketImpl
andWebSocketInstance
. 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
OperationTimeoutError
when 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
actionInitiated
is now of typenumber
which is incremented when thecreate
,close
action on an entity is under process and decremented when the action completes (succeeeded or failed).
- Improved log statements for better debugging.
- Any type of
error
event will be emitted with a tick delay. This would give enough time for thecreate()
methods to resolve the promise. - Added a new
boolean
propertyactionInitiated
which indicates whether thecreate
,close
action on an entity is under process.
options
is a required property ofConnection
andContainer
.
- 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.