HISTORY notes for AMPS JavaScript Client
This page provides a list of changes made in each version of AMPS JavaScript Client.
JavaScript version 5.3
Version 5.3.4.0 (2024-05-17)
New features:
- Add official support for the
esbuildbundler. (AC-1280, Z16710)
Fixes and Improvements:
-
Upgrade the WebSocket dependency to avoid a potential vulnerability trigger by security audit systems. The client does NOT use the functionality affected by this vulnerability, but the client has now updated the version it depends on to a patched version. (AC-1294, Z17059)
-
Fix issue a client that disconnects due to a heartbeat timeout could hang on a subsequent reconnection. (AC-1278, Z16710)
-
Update the quick start documentation that is included in the distributed client archive to reflect changes made to the sample AMPS configuration file.
Version 5.3.3.1 (2022-05-04)
Fixes and other changes:
- Fix issue where a client in high availability mode that is rapidly
disconnected after sending a
logonrequest (for example, due to authentication failure) could fail to send alogonrequest after reconnecting. (AC-1182, Z14072)
Version 5.3.3.0 (2022-04-08)
New features:
-
Ids that are automatically generated by the
Clientare now prefixed with “auto” to prevent unintentional clashes with user-specified, numeric ids. (AC-1027) -
Client.flushadds a new overload that accepts an ack type to request. This argument accepts an ack type ofprocessedor an ack type ofpersisted. When the argument is specified, the client will always send aflushcommand to the server, regardless of whether aStoreis present. With an ack type specified:-
A
processedacknowledgement requests that AMPS acknowledge that theflushcommand has been received and processed. -
A
persistedacknowledgement requests that AMPS acknowledge that theflushcommand has been received and processed and that all previous messages have been persisted.
There are no changes in behavior to the existing version of the
Client.flushmethod. (AC-1046) -
Fixes and Improvements:
-
The protocol and message type detection mechanism is now using a suffix form (
ws://host:port/long/path/amps/json) rather than a prefix form (ws://host:port/amps/json/long/path) that had been used previously. -
The client version reported to the server now has the suffix
:javascriptadded, similarly to other AMPS client libraries. This change does not affect the value returned by the staticClient.version()method. -
Fix issue where a subscription with a custom id does not receive user-requested acknowledgment messages. (AC-1136)
-
Fix issue where calling the
Client.disconnect()method on a client in a non-initialized state would cause the method to throw an error. -
The
TopNcommand header is now deprecated and will be removed in the future. Instead, theTopNvalue can be specified as a part of theOptionsheader:top_n=VALUE. (AC-1132)
Version 5.3.2.0 (2020-09-30)
New features:
- Full support of bookmark range subscriptions. New classes
BookmarkFieldandBookmarkRangeFieldprovide support for bookmark range subscription recovery using theBookmarkStoreinterface. (AC-908) - The
Clientclass now has thenameHash()getter method to get the client name hash value after successful logon. (AC-905)
Fixes and other changes:
- The
BookmarkStoreinterface specification has been updated to utilize the new bookmark fields. (AC-908) - Code snippets in API documentation have been converted to use modern ES6+ syntax.
- Client constants, such as
BookmarksandConnectionStateListenerare now better supported by various TypeScript-based auto-completion language servers.
Version 5.3.0.3 (2020-01-16)
Fixes and other changes:
- Fix issue where a message with an empty
datafield is delivered to a subscription with the header of the next message as thedatafield of this message. When this happens, subsequent messages may also be delivered with the header of the next message in thedatafield. (AC-941, Z10531)
Version 5.3.0.2 (2019-11-20)
Fixes and other changes:
- Fix issue where the
completedmethod of theAuthenticatorinterface is invoked with original credentials rather than the final credentials reported in the logon acknowledgment. (AC-929, Z10276)
Version 5.3.0.1 (2019-08-09)
New features:
- The
Clientclass now hasfailedWriteHandler()setter and getter methods to supply an optional handler for failedpublish,delta_publishandsow_deletecommands. - The
Clientclass now haslastChanceHandler()setter and getter methods to supply an optional handler function that receives messages when no other handler matches.
Fixes and other changes:
- Fix issue when the client could ignore a heartbeat absence event in a WebWorker context due to potentially inaccurate asynchronous timer events in JavaScript. (AC-906, Z9774)
Version 5.3.0.0 (2019-05-01)
Fixes and other changes:
- Fix issue where the client would not set the
timestampheader on asowmessage, even when a timestamp was present due to thetimestampoption being requested on the command. (AC-808) - Fix issue where an error handler is not invoked when a message handler crashes during execution. (AC-854)
JavaScript version 5.2
Version 5.2.4.0 (2018-08-23)
New features:
- The
Client.connect()method can now be called with an options string, such as "ack_conflation=500ms". (AC-792) - The
Clientclass now haslogonOptions()setter and getter methods to set the options to be used forlogon. (AC-792). - Add new
ConnectionStateListenerinterface for notification of connection, logon, heartbeat, disconnection, and other events from an AMPS Client.
Fixes and other changes:
- Message type specified in the connection URI can be case-sensitive.
Version 5.2.3.0 (2018-04-09)
New features:
- Added an optional string argument to the
Client.ack()method to allow passing of an options string, such ascancel,expire, orlease_extension=60s. (AC-726) - Added ability to use pretty printing of binary message types as the data format by specifying
?pretty=truein the URI. (AC-755) - Added the
Client.serverVersionAsInt()method which represents the AMPS Server version as an integer of typeXXYYZZWWW, e.g.,5.2.3.0will be represented as50203000. (AC-744)
Fixes and other changes:
- The FIX/NVFIX field delimiter at the end of a message is now optional for the default FIX/NVFIX type helper. Although this delimiter is required by the standard, some systems do not correctly produce the delimiter. (Z7085)
- The
unsubscribe()method can be called without arguments now in order to unsubscribe from all subscriptions. - Calling the
Client.ack()method on a message without a bookmark is now ignored. (AC-733) - Replaced
1|0|to0|1|for theClient.Bookmarks.NOWconstant. (AMPS-3686)
Version 5.2.2.5 (2017-12-08)
Fixes and other changes:
- Add the missing
Client.logonCorrelationIdmethod. (Z6414) (AC-731)
Version 5.2.2.4 (2017-10-23)
Fixes and other changes:
- Fix issue where a bookmark subscription on a specific bookmark could be disconnected before receiving any messages and would then resubscribe using EPOCH upon reconnecting. (Z6008) (AC-703)
Version 5.2.2.3 (2017-09-06)
Fixes and other changes:
- Client side heartbeating now better handles large result sets and will not disconnect from the server while messages are being received. Previously, the client could consider the server to be unresponsive if a result set took longer than the heartbeat interval to be consumed (AC-685).
Version 5.2.2.2 (2017-08-15)
Fixes and other changes:
- Publishing performance improved (AC-681).
Version 5.2.2.1 (2017-08-15)
Fixes and other changes:
- The default acknowledgement timeout value should be
1sif acknowledgement batch size is greater than 1 (AC-667). sow,sow_and_subscribeandsow_and_delta_subscribecommands do not receive user-requested acknowledgement messages (AC-677).- Improved handling of invalid messages. (AMPS-3013).
- Minor cosmetic changes to syntax in LICENSE file.
Version 5.2.2.0 (2017-06-15)
New features:
- The AMPS JavaScript client is now available through the NPM package manager (
amps). - TypeScript typings are included within the package.
- Native support of
RequireJS,AMD,ES6, andTypeScriptmodule loaders. - Full support of new environments:
WebWorker,Electron,OpenFin. - Full support of
async/awaitand other ES6/ES7 JavaScript features. - Code completion and inline documentation for each method is provided within common JavaScript/TypeScript IDE/text editors (VSCode, WebStorm, VIM).
- High Availability features added:
ServerChooserto determine the next URI to connect to and theAuthenticatorto use for that connection.DelayStrategyto determine how long to wait before attempting to reconnect.PublishStoreto republish any messages the have not been persisted by the server.SubscriptionManagerto re-establish subscriptions for the client.BookmarkStoreto determine the most recent bookmark, and resubscribe with that bookmark (for bookmark subscriptions).
- New methods of the
Clientclass (excluding the getters/setters for the above HA classes):sowDelete- executes a SOW delete with a filter.sowDeleteByData- deletes a message from a SOW, using data supplied to locate a SOW entry with matching keys.sowDeleteByKeys- executes a SOW delete for the sow key(s) provided.ackBatchSize- setter/getter for the acknowledgement batch size of the client. This is used when acknowledging messages from a queue.ackTimeout- setter/getter for the acknowledgement batch timeout of the client. This is used when acknowledging messages from a queue.autoAck- setter/getter for the autoAck option of the client. When this mode is on, AMPS acknowledges queue messages automatically.deltaPublish- delta publishes a message to a SOW topic.transportFilter- sets/gets the transport filter to observe incoming and outgoing messages in the format they are sent and received on the network. This allows you to inspect or modify outgoing messages before they are sent to the network, and incoming messages as they arrive from the network. This can be especially useful when using SSL connections, since this gives you a way to monitor outgoing network traffic before it is encrypted, and incoming network traffic after it is decrypted.disconnectHandler- sets/gets the disconnect handler that is in case of an unintentional disconnection. (This can be used for basic reconnection handling when High Availability features are not used. 60East recommends using the provided High Availability features where possible).flush- performs the flush command. This sends a command to AMPS that returns an acknowledgement when all previous messages from this client have been received and processed. This command helps applications that use AMPS determine when AMPS has received all of the commands that have been previously sent, making it safe for the client to exit.reconnectDelay- sets a reconnection delay for the client. This is a convenience method that sets up a FixedDelayStrategy with a requested delay value;createMemoryBacked- static method that creates a memory-backed client that tracks bookmarks and subscriptions in memory. Subscriptions are automatically restored after a reconnection usingDefaultSubscriptionManagerobject.MemoryBookmarkStoreis enabled for bookmarks,MemoryPublishStoreis enabled for publishing messages.
- FIX/NVFIX type helpers support custom delimiters.
Fixes and other changes:
- The default
batchSizevalue is increased to 10, to be consistent with the other AMPS clients. - The default FIX/NVFIX delimiter value is set to the
\x01(<SOH>) value. - Improved
publishperformance.
Version 5.2.1.1 (2017-05-06)
Changes:
- The LICENSE file has been added. (AC-648)
Version 5.2.1.0 (2017-03-23)
New features:
- Default FIX/NVFIX type helper has been added. Messages are converted into JavaScript objects. Repeating groups will take on their last value and ordering of fields isn't preserved. (Z4414) (AC-632)
Version 5.2.0.3 (2017-03-22)
Fixes and other changes:
- Fix bug where the sowAndSubscribe() method was failing with a string filter argument value. (Z4414) (AC-631)
Version 5.2.0.2 (2017-03-21)
Fixes and other changes:
- Fix bug where the client did not call the registered errorHandler after an unintended disconnection; (Z4743) (AC-630)
- Temporary file has been removed from the distribution archive.
Version 5.2.0.1 (2017-03-14)
Fixes and other changes:
- Fix
sow_and_(delta_)_subscribewith replace. A replaced sow/subscription wasn't reporting to the original message handler. (Z4709) (Z4710) (AC-626)
Version 5.2.0.0 (2017-03-09)
This is the initial release of the AMPS JavaScript client. The AMPS JavaScript client supports AMPS servers 5.2.0.0 and later.
Main features:
- A fully asynchronous Promise-based interface;
- Convenience methods for common commands, such as publish, subscribe, sow, deltaSubscribe;
- Heartbeating for detecting connection failures.
- The Command interface for custom commands and their options;
- Support of enterprise authentication systems, such as Kerberos, NTLM, and Basic Auth;
- Support of Authenticators for custom authentication scenarios.
Limitations in this release:
- The
SO_LINGERoption can prevent the websocket library from closing the connection in case of heartbeat absence. (AC-594)