Skip to main content

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 esbuild bundler. (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 logon request (for example, due to authentication failure) could fail to send a logon request after reconnecting. (AC-1182, Z14072)

Version 5.3.3.0 (2022-04-08)

New features:

  • Ids that are automatically generated by the Client are now prefixed with “auto” to prevent unintentional clashes with user-specified, numeric ids. (AC-1027)

  • Client.flush adds a new overload that accepts an ack type to request. This argument accepts an ack type of processed or an ack type of persisted. When the argument is specified, the client will always send a flush command to the server, regardless of whether a Store is present. With an ack type specified:

    • A processed acknowledgement requests that AMPS acknowledge that the flush command has been received and processed.

    • A persisted acknowledgement requests that AMPS acknowledge that the flush command 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.flush method. (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 :javascript added, similarly to other AMPS client libraries. This change does not affect the value returned by the static Client.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 TopN command header is now deprecated and will be removed in the future. Instead, the TopN value can be specified as a part of the Options header: top_n=VALUE. (AC-1132)

Version 5.3.2.0 (2020-09-30)

New features:

  • Full support of bookmark range subscriptions. New classes BookmarkField and BookmarkRangeField provide support for bookmark range subscription recovery using the BookmarkStore interface. (AC-908)
  • The Client class now has the nameHash() getter method to get the client name hash value after successful logon. (AC-905)

Fixes and other changes:

  • The BookmarkStore interface 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 Bookmarks and ConnectionStateListener are 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 data field is delivered to a subscription with the header of the next message as the data field of this message. When this happens, subsequent messages may also be delivered with the header of the next message in the data field. (AC-941, Z10531)

Version 5.3.0.2 (2019-11-20)

Fixes and other changes:

  • Fix issue where the completed method of the Authenticator interface 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 Client class now has failedWriteHandler() setter and getter methods to supply an optional handler for failed publish, delta_publish and sow_delete commands.
  • The Client class now has lastChanceHandler() 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 timestamp header on a sow message, even when a timestamp was present due to the timestamp option 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 Client class now has logonOptions() setter and getter methods to set the options to be used for logon. (AC-792).
  • Add new ConnectionStateListener interface 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 as cancel, expire, or lease_extension=60s. (AC-726)
  • Added ability to use pretty printing of binary message types as the data format by specifying ?pretty=true in the URI. (AC-755)
  • Added the Client.serverVersionAsInt() method which represents the AMPS Server version as an integer of type XXYYZZWWW, e.g., 5.2.3.0 will be represented as 50203000. (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| to 0|1| for the Client.Bookmarks.NOW constant. (AMPS-3686)

Version 5.2.2.5 (2017-12-08)

Fixes and other changes:

  • Add the missing Client.logonCorrelationId method. (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 1s if acknowledgement batch size is greater than 1 (AC-667).
  • sow, sow_and_subscribe and sow_and_delta_subscribe commands 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, and TypeScript module loaders.
  • Full support of new environments: WebWorker, Electron, OpenFin.
  • Full support of async/await and 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:
    • ServerChooser to determine the next URI to connect to and the Authenticator to use for that connection.
    • DelayStrategy to determine how long to wait before attempting to reconnect.
    • PublishStore to republish any messages the have not been persisted by the server.
    • SubscriptionManager to re-establish subscriptions for the client.
    • BookmarkStore to determine the most recent bookmark, and resubscribe with that bookmark (for bookmark subscriptions).
  • New methods of the Client class (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 using DefaultSubscriptionManager object. MemoryBookmarkStore is enabled for bookmarks, MemoryPublishStore is enabled for publishing messages.
  • FIX/NVFIX type helpers support custom delimiters.

Fixes and other changes:

  • The default batchSize value 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 publish performance.

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_)_subscribe with 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_LINGER option can prevent the websocket library from closing the connection in case of heartbeat absence. (AC-594)