Skip to main content

HISTORY notes for AMPS Java Client

This page provides a list of changes made in each version of AMPS Java Client.

Java version 5.3

Version 5.3.5.0 (2025-09-15)

Breaking changes:

  • Client.setDisconnectHandler has been marked as deprecated. Automatic failover should be handled using an HAClient. Monitoring the connection state should be done with a ConnectionStateListener. This change means that the client now enforces the long-standing best practice that applications should not replace the disconnect handler. (AC-1276)
  • Calling setDisconnectHandler on an HAClient will throw a CommandException as this would disable the automatic failover behavior. This change means that the client now enforces the long-standing best practice that applications should not replace the disconnect handler. (AC-1276)

New features:

  • The new bookmark_not_found option available in AMPS server 5.3.5.0 and above is now supported in the Message.Options class. (AC-1338)
  • Added missing copy() to NVFIXMessage class. (AC-875)
  • Adds support for zlib compression when connecting to AMPS. Zlib compression increases CPU consumption and may reduce network traffic for some message types. Zlib compression is specified by adding a compression=zlib option to the connection URI. (AC-1035)
  • Added setCommandId(String) and setQueryId(String) to Command class as analogs to existing versions taking CommandId. (AC-1264)
  • Removed unused excption types: InvalidProtocolException, InvalidProtocolOptionsException, InvalidTransportOptionsException, TransportException, and PublishFilterException. (AC-1310)

Fixes and other changes:

  • The Client will now do all internal processing of ack messages before delivering the ack to any registered handlers. (AC-766)
  • A StoreException will be thrown if null is used as the subId for any BookmarkStore function. (AC-903)
  • Removed potential deadlock between BookmarkStore implementations and RecoveryPointAdapter implementations when using DynamicRecoveryPoint as the RecoveryPoint type. (AC-1288)
  • Fixed logic for functions that return MessageStream objects so they aren't closed if the disconnect occurs before the command is sent. (AC-1331)
  • When executing a Command for unsubscribe, the client will now correctly remove any message handlers for the subscription and update the SubscriptionManager to not restart the subscription. (z18760) (AC-1349)
  • A SOWRecoveryPointAdapter created with a client that hasn't been connected will no longer throw an exception during stack unwind caused by throwing an exception when used to initialize a BookmarkStore. (z18948) (AC-1355)
  • A newly constructed MemoryPublishStore will now always start sequencing at a manufactured value rather than a value based on what the AMPS server acknowledges during logon. This prevents incorrectly treating messages as duplicates in the case where a client has previously published more messages than the AMPS server can acknowledge during logon. (AC-1358)
  • BookmarkStore.getMostRecent now always returns a new Field. This avoids any race conditions where the Field could change in another thread. (AC-1363)
  • A timeout set on calls to sowDelete, sowDeleteByKeys, or sowDeleteByData functions that return a Message now applies to both the time it takes to get a processed ack from the server and the time the server takes after the processed ack to return the stats ack. (AC-1371)
  • Prevent a deadlock that could occur from an immediate call to connect on a Client following an exception from calling logon. (AC-1376)

Version 5.3.4.1 (2025-03-14)

Fixes and Improvements:

  • Fix the client's transport to set a socket read timeout of 30 seconds, by default, during the SSL handshake phase of connection establishment. Previously, the client's normal socket read timeout wasn't set until the handshake phase was complete, so if a server handshake response never arrived, the client would wait indefinitely. When customizing the TCP connection timeout (which is indefinite by default) using the tcp_connecttimeout connection URI parameter, its value will also be used to override the 30 second handshake read timeout. (AC-1359, Z19029)
  • Fix amps protocol serialization and deserialization to properly handle escaping of the options and orderBy message header fields. (AC-1292)
  • Fix client to send a heartbeat message at the set heartbeat interval (if set), even when no messages are arriving from AMPS. Previously, the client would only send a heartbeat message in response to messages (heartbeats or otherwise) arriving from AMPS. (AC-1305)
  • Fixed MessageStream hang when rapidly reusing query IDs in Client.execute() calls with SOW commands. (AC-1309)
  • Fix binding to a local network interface and port number when specifying the bind connection URI parameter. Previously, binding to a specific interface would work correctly only when specifying a local network interface without the port. Also fix handling of local network interfaces specified by IPv6 addresses with square bracket notation. (AC-1344, Z18681)

Version 5.3.4.0 (2024-04-04)

New features:

  • Fix to make it easier to extend TCP and TCPS Transports (for example, to add proxy negotiation to the connection process). (AC-1058, Z12429)

  • Added a way for clients to be notified and take action when a subscription fails after a fail-over event. The SubscriptionManager now has a setFailedResubscribeHandler which takes an implementation of the new class FailedResubscribeHandler. (AC-1096) (z12909)

  • Added default constructor and setName function to Client and a default constructor to HAClient for use in frameworks that require default constructors. The name can only be set once and changing the name once it is set will throw an exception. (AC-1184) (z14094)

  • Added setErrorOnPublishGap to the Store interface. If this is set, a Store implementation will throw an exception if a server attempts to acknowledge a sequence number for a message that is already discarded. This can be useful to keep a client from failing over to a server that was not using sync acknowledgement to the server the client was previously connected to until all messages the client published have arrived at the new server. (AC-1202) (z13761)

  • AMPS Java Client now supports MacOS on arm64 and x86_64. (AC-1200)

  • AMPS Java Client now supports Linux on arm64.

  • Added tcp_idlereadtimeout URI parameter to set read timeout between 1 and 1000ms. Also added getIdleRunnable to the Transport interface. This allows for setting tasks to be run by the reader thread when the socket is idle and chaining new tasks with previous ones. (AC-1282)

  • Added http_preflight URI parameter to help route connections to AMPS through proxy servers by starting the connection with an HTTP GET upgrade request. Using this feature requires using the amps protocol and AMPS server version 5.3.4.0 or higher.

    Extra headers may be set on the GET message using addHttpPreflightHeader multiple times or setHttpPreflightHeaders once with the list of headers as strings. (AC-1284)

  • Added initFromClient to Transport interface to ease introduction of new transport-related features that are easier to set on the Client. The function is called by Client whenever it has a new Transport.

  • Added getters for transport filter and thread created handler to the Client.

Fixes and Improvements:

  • Rethrow CommandExceptionas a ConnectionException from logon so that logon failures such as invalid message type are correctly seen. (AC-1122)
  • Fix possible locking issues in MessageStream to prevent invalid concurrent access if the stream is conflating messages (that is, if client side confaltion is in use). (AC-1186)
  • Changed publish store classes to throw a StoreException if they attempt to resize beyond maximum array size, rather than NegativeArraySizeException or IllegalArgumentException. (AC-1201) (z14395)
  • The ack timeout on the Client no longer allows 0, or no timeout, when the ack batch size is greater than 1. This prevents any partial batches from never being sent to the server, leaving the queue messages as processed by the client but unacknowledged. (AC-1206)
  • Change field escaping to include command id and query id on inbound messages, include query id on outbound, and not include command or top_n on outbound messages. (AC-1215)
  • Fixed possible hang or missed acks when a disconnect occurred while sending sow_delete commands. (z8567) (AC-1220)
  • Remove default setting of so_linger on new connections. (AC-1255)
  • Documentation has been expanded to cover some previously missed items and improve clarity. (AC-1257)
  • Prevent any commands from being sent to the server while waiting for the logon ack and ensure no duplication with commands that are sent as part of the overall logon process such as heartbeat commands. (AC-1262)
  • Prevent bookmark stores from returning a list of bookmarks beginning with EPOCH in cases where: messages have been logged from the server, messages other than the very first one have been discarded, and at least one persisted ack has arrived from the server. (AC-1266) (z16462) (z16700)
  • If an attempt is made to change the protocol or transport type that a Client is using, a ConnectionException will be thrown with a clear error stating what has changed. Previously, the connection could fail without any clear message on the client side. (AC-1275)
  • TimedOutException on the client side will now send an unsubscribe to the server to prevent the timed out command from eventually succeeding and returning data the client is no longer expecting. (AC-1281)
  • SOWRecoveryPointAdapter will now throw StoreException from its constructor in the case where the trackedClientName matches the name of the Client being used to write to the SOW. This was previously allowed, though documented not to work. (AC-1285)
  • Fix a potential deadlock that can occur when one thread calls disconnect on the client while the reader thread is performing an interruptable task for which an InterruptedException is caught and not rethrown. This could cause a situation where the thread calling disconnect is waiting for the reader thread to shut itself down and the reader thread is trying to acquire a lock to handle closing the connection. (AC-1286) (z16884)

Version 5.3.3.6 (2023-12-01)

Fixes and Improvements:

  • Fix regression introduced in the 5.3.2.0 Java client, where executing a historical SOW query throws a NullPointerException when the command's subscription id field is null. (Z16339) (AC-1263)

  • Allow setting a TLS server name indication (SNI) via a connection URI parameter. (Z16460) (AC-1235)

  • Allow setting a TCP connection timeout via a connection URI parameter. (Z16460) (AC-1267)

  • Fix hang in publish stores that may occur when attempting to replay a single message by its sequence number (such as when the HAClient is reconnecting) and:

    • An acknowledgement arrives for that message at the same time, or

    • An exception is concurrently thrown while attempting to store that message.

    (Z16043) (AC-1248)

  • Fix deadlock that can occur when publishing on an HAClient with a publish store registered, where:

    • The client has never connected, and

    • The connectAndLogon() method is called for the first time.

    (Z15888) (AC-1253)

  • Fix deadlock that can occur when calling HAClient.connectAndLogon() more than once without first disconnecting (via disconnect() or its synonym close()) and then, when the method is called, the client happens to be reconnecting at the same time.

    This invalid practice has been corrected to throw AlreadyConnectedException on subsequent calls made without first calling disconnect().

    In addition, a regression introduced in the 5.0.1.1 Java client has been corrected such that subsequent calls to Client.connect(), without first disconnecting, once again throw AlreadyConnectedException instead of ConnectionRefusedException. (Z16172) (AC-1258)

Version 5.3.3.5 (2023-03-16)

Fixes and Improvements:

  • Fix LoggedBookmarkStore handling of discarded bookmarks after recovery to ensure that all duplicates are recognized. Previously, if an application discarded messages out of order, it was possible to deliver a previously discarded bookmark in the following sequence of events:

    • At least one message from a given publisher has not been discarded but a later message from the same publisher has been discarded

    • The application discards an undiscarded message from a publisher before later messages from the same publisher (that were previously discarded) arrive from AMPS

    In this case, previously discarded messages from that publisher could fail to be detected as duplicates and could be delivered to the subscription. Messages from other publishers are not affected.

    Applications that discard messages in the order that they are received are unaffected. (AC-1224) (z15470)

Version 5.3.3.4 (2023-02-10)

Fixes and Improvements:

  • Fix regression introduced in AMPS Java client 5.3.2.0 where the BookmarkField.isTimestamp() method would require the trailing Z time zone indicator on a timestamp value. The AMPS User Guide documents the Z time zone indicator as optional (Z is assumed). AMPS also accepts timestamps without the Z time zone specified. (Z15340) (AC-1218)

Version 5.3.3.3 (2022-05-09)

Fixes and Improvements:

  • Fix issue when parsing message headers from a connection to a Transport that uses the legacy xml protocol for communication with AMPS that could result in header values remaining unset. With this issue, parsing would stop prematurely when the <TopicMatches> header was reached, causing the TopicMatches field and any following fields to remain unset. With this fix, all headers are properly parsed. Connections using the amps protocol (or the other legacy protocols) were not affected. (Z14156) (AC-1178)

  • Fix issue where test dependencies were listed in the released POM file of the AMPS Java client Maven package. With this fix the POM file no longer lists dependencies for unreleased tests. (Z14107) (AC-1174)

Version 5.3.3.2 (2022-03-25)

Fixes and Improvements:

  • Fix issue where an unnecessary Field object would be allocated while receiving messages for a subscription. This object is no longer allocated. (Z14049) (AC-1167)

  • Fix Javadoc warnings in the documentation comments for MessageStream.setSubscription() and AckTypeField.decodeAckType() (Z14040) (AC-1171)

Version 5.3.3.1 (2022-02-21)

Fixes and Improvements:

  • Fix issue in TCPTransportImpl where a runtime exception thrown by the transport's registered exception listener callback can cause the client to stop reconnecting or cause the client's background reader thread to terminate. (Z13741) (AC-1152)

  • Fix issue where the sequence number assigned to a published message by the publish store, was not made available via Command.getClientSequenceNumber() when an exception (such as DisconnectedException) was thrown during publish command execution. (Z13741) (AC-1154)

  • Fix issue where LoggedBookmarkStore would ignore a timestamp bookmark value from a RecoveryPointAdapter upon recovery, such as the SOWRecoveryPointAdapter with the useTimestamp parameter set to true. The LoggedBookmarkStore would incorrectly use the bookmark log file creation time as the recovery timestamp, even if the file was newly created during recovery. (Z13710, AC-1156)

  • Fix deadlock that can occur during reconnect if another disconnect is detected before the reconnect completes. This can only happen when a zero (unlimited) timeout is being used for logon or resubscribe. (Z13588) (AC-1147)

  • Fix issue in MemoryBookmarkStore that causes a malformed most recent bookmark to be returned during recovery when it's used with a SOWRecoveryPointAdapter that makes use of the recovery timestamp feature (i.e. useTimestamp_ is true). (Z13551) (AC-1148)

  • If a list of bookmarks is provided to client.ack(topic, bookmark) and ack batching is on, parse the list so correctly sized batches are sent. In all cases, ensure that byte[] resizes are large enough to hold the entire new bookmark value. (Z13301) (AC-1130)

  • Fix regression where duplicate reason code strings were introduced into ReasonField in version 5.3.3.0. This can cause an incorrect error message to be displayed when converting some reason codes from a failure acknowledgement into a string. (AC-1126)

  • Fix persisted ack processing in LoggedBookmarkStore and MemoryBookmarkStore, where sequence number comparisons where being treated as signed long integers instead of unsigned long integers. This could lead to incorrect processing for very large sequence numbers. (AC-1109)

Version 5.3.3.0 (2021-09-03)

New features:

  • This release supports IPv6 addresses for AMPS servers. (AC-991)

  • New Exception classes have been added to provide more precise exception translation for status codes returned from current versions of the AMPS server. (AC-502)

  • Client.publishFlush 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. If a Store is present, the command will also wait for all messages currently in the publish store to be acknowledged before returning. 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.publishFlush method. (AC-1046)

Fixes and Improvements:

  • Persisted acks with a failure status for bookmark subscriptions will no longer be delivered to the FailedWriteHandler when there is no publish store in place on the Client. (z4702) (AC-627)

  • Fix issue where RingBookmarkStore didn't properly recover when used with a bookmark range. (AC-1112)

  • Fix handling of bookmark lists and bookmark ranges starting with bookmark lists in LoggedBookmarkStore and MemoryBookmarkStore. (AC-1112)

  • Fix issue in MessageStream where closing it may not remove all references to the MessageStream as a MessageHandler when the sub_id differs from the associated command_id and an ack was explicitly requested. (AC-1112)

Version 5.3.2.1 (2021-07-16)

Fixes and other changes:

  • Fix JavaDoc warnings and errors when compiling with Java 1.8. These errors and warnings had no effect at runtime. This fix allows the client to compile from source when the compiler is is set to fail the build on any warning or error. (Z12969) (Z13004) (AC-1100)

Version 5.3.2.0 (2021-06-09)

Breaking changes:

  • Support for AMPS server versions before 4.0.0.0 has been removed from the BookmarkStore classes to improve their performance. (AC-391)
  • The startTimer and stopTimer functions on Client are marked as deprecated. Starting in AMPS server version 5.3.2.0 these commands are no longer available. (AC-969)
  • MessageStream will now deliver all queued messages before throwing a DisconnectedException once a disconnect has been detected. (AC-985)
  • The ExceptionListener set on a Client will now also be set on its Transport by default. The Transport can be updated with its own ExceptionListener after the Client is connected. (z11871) (AC-1011)
  • Client.deltaPublish now returns the sequence number, if one was set, similar to Client.publish. (AC-1016)

New features:

  • The Client now has a setGlobalCommandTypeMessageHandler function that is used to put in place handlers for all messages of a specific command type, such as ack. A MessageHandler put in place this way will get invoked for every message of the given type, regardless of whether that message is also handled elsewhere. (z3407) (AC-450) (AC-565) (AC-658) (AC-675)
  • Added Client.setThreadCreatedHandler and new ThreadCreatedHandler interface. Each time a new client background thread is created, the handler will be invoked by the created thread before it starts receiving messages. This can be used to do things like set the name of the thread or other thread attributes. (z9855) (z9764) (AC-516) (AC-907)
  • A MemoryBookmarkStore or LoggedBookmarkStore can now be created with a RecoveryPointAdapter. The adapter can be implemented to save a RecoveryPoint somewhere for later recovery to guarantee no missed messages. (AC-527) (AC-981)
  • The Client now has a setTransportFilter method that will set the TransportFilter on any Transport created by the Client. This can be set before connecting. (AC-657) (AC-1057)
  • A SOWRecoveryPointAdapter implementation of the RecoveryPointAdapter interface has been added. The behavior of this adapter is to save every update into an AMPS SOW topic in the server using a separate client. (AC-756) (AC-980)
  • The client name hash, used by the AMPS server, is now accesible using Client.getNameHash after the client has logged on to AMPS. (AC-905)
  • The bookmark range subscription feature, released in AMPS server version 5.3.2.0, is fully supported by all BookmarkStore implementations to support resumable bookmark range subscriptions. (AC-908)
  • Made getSequence public on the Command class. The sequence can be checked after a call to execute for commands such as publish, delta_publish, and sow_delete to get the sequence number that was assigned by the publish store (if a publish store is present). (z11000) (AC-954)
  • A ConflatingRecoveryPointAdapter implementation of the RecoveryPointAdapter interface have been added. The adapter starts a thread that conflates updates before passing them to an underlying RecoveryPointAdapter (such as a SOWRecoveryPointAdapter) to reduce the number of updates. (AC-965)
  • LoggedBookmarkStore will now allow subid and bookmark lengths greater than 255 characters. The limit is now Integer.MAX_VALUE. This changes the file format of the store file. The client will automatically update files in the previous format. (AC-998)
  • Ids that are automatically generated by the Client are now prefixed with "auto" to prevent unintentional clashes with user-specified, numeric ids. (AC-1027)
  • Classes with close functions now implement AutoCloseable interface. This includes: Client, HAClient, MessageStream, all BookmarkStore implementations, all RecoveryPointAdapter implementations, all Store implementations, and all Transport implementations. (AC-1083)

Fixes and other changes:

  • Fix Message.copy to only copy the used portion of the buffer rather than the entire buffer. (z2320) (AC-396)
  • Improved LoggedBookmarkStore file recovery such that the IOException thrown if corruption is found now includes the line number and the file name. (z9263) (AC-874)
  • If a failed persisted ack returned by the server contains a sequence number and the Client does not have a publish store, the sequence number will be set on the Message sent to the FailedWriteHandler. (AC-884)
  • Fix issue in LoggedBookmarkStore where discarding messages out of order, then failing over, receiving more messages, and failing over again could cause an incorrect most recent bookmark. (z10507) (AC-953)
  • Ensure that Client.execute called with a Command not returning any data returns an empty MessageStream. (AC-964)
  • Ensure that message handlers are removed when a command sent to AMPS fails. (AC-982) (AC-983)
  • Fix HAClient.connectAndLogon to not allow any commands to be sent between connect and logon. (AC-1015)
  • Fix HAClient.connectAndLogon to reset the ReconnectDelayStrategy when called to allow a new attempt after the ReconnectDelayStrategy had previously timed out. (AC-1030)
  • Fix Client and HAClient to set BookmarkStore, DisconnectHandler, ReconnectDelayStrategy, and SubscriptionManager to default versions if a null is passed in to the set function. (z12237) (AC-1040)
  • Fix src distribution to have correct values in ClientVersion.java where previously there were placeholders. (z12331) (AC-1041)
  • Fix BookmarkStore implementations to return copies of the most recent field. (z12476) (AC-1060)
  • Fix Client.syncAckProcessing to include the topic name when throwing InvalidTopicException (z12624) (AC-1076)
  • Update BlockPublishStore to no longer check if a resize is greater than Integer.MAX_VALUE and rely on either the PublishStoreResizeHandler (or the system running out of memory) to manage the maximum store size. (z12668) (AC-1077)
  • Fix MessageStream to remove its message handler when it is notified that the Client is disonnected. (AC-1079)
  • Fix Client.publishFlush(0) and BlockPublishStore.flush(0) to act as if there is no timeout, rather than an immediate timeout. (AC-1085)
  • Fix issue in synchronous command execution where a non-functioning MessageStream could be returned when a command is executed on a client that is disconnected and trying to reconnect. (z12590) (AC-1090)
  • Fix HAClient race where its disconnect handler could reconnect a disconnected client after close() or disconnect() is called. (AC-1092)

Version 5.3.0.4 (2020-07-22)

Fixes and other changes:

  • Fix invalid state that can occur in a bookmark store ring buffer when a resize operation executes after a call to getMostRecent(subId) for a bookmark subscription where messages aren't being immediately discarded or out of order discarding is being used. A getMostRecent(subId) call occurs at the start of MOST_RECENT bookmark subscriptions and when resubscribing after a disconnect/reconnect cycle, such as failing-over between AMPS servers. The invalid ring buffer state can lead to a hang when discarding the subscription's last undiscarded message. (Z11270) (AC-978)

Version 5.3.0.3 (2020-06-19)

Fixes and other changes:

  • Fix publisher hang that occurs after a publish store resize operation when using a custom resize handler, in cases where the custom resize handler throws an exception or where space has become free while the resize handler was running (for example, if a persisted ack from the server arrived). (Z11270) (AC-971)
AMPS Java Client Version 5.3.0.2 was intentionally skipped

Version 5.3.0.1 (2019-10-29)

Fixes and other changes:

  • Fix issue where persisted acks delivered on a bookmark subscription could be logged into the client's bookmark store after the subscription has been unsubscribed (but before the client is closed/disconnected). This could cause the subscription to "skip ahead" in the transaction log (ahead of the expected resume point) when later resubscribing the subscription at the MOST_RECENT bookmark. This can only happen if the client side of the subscription has not caught up to the server, such that there are content messages "in flight" (on the wire or waiting in a TCP buffer) and the application has discarded all messages received so far through the subscription's message handler. (Z10045) (AC-912)
  • Fix issue with LoggedBookmarkStore.log() where a concurrently executed call to LoggedBookmarkStore.prune() could cause the concurrent logged bookmark entry (b entry) to be lost from the pruned bookmark log file (though not lost from in-memory state). If the application then discards this message and shuts down, and later recovers the bookmark subscription from this file, this last discarded message will be redelivered as a duplicate. NOTE: Since the in-memory state is still correct, a subsequent call to prune() would correct the bookmark log file. Any application that follows the best practice of pruning the bookmark store during shutdown, after the client is closed/disconnected, would likely never observe this issue. (AC-913)

Version 5.3.0.0 (2019-07-31)

New features:

  • Added Select and Expire to Message.Options. (AC-882)
  • Added an optional boolean parameter to LoggedBookmarkStore constructor that indicates if the store should include its file's last modified timestamp in its most recent bookmark. This is useful for applications that may be offline long enough that their most recent bookmarks are no longer in the transaction log of the server, but which do not want AMPS to start the subscription from NOW (which is the default if the bookmarks are all unknown to AMPS). Including the last modification time of the bookmark store in the recovery string ensures that AMPS will start at the modification time if none of the bookmarks provided are still present in the journal, which will cause the replay to begin at the earliest mesasge in the transaction log rather than at the current point in time (NOW). (z5314) (z9621) (AC-887)

Breaking changes:

  • The Client.flush function has been marked Deprecated. It had no functionality previously. The method Client.publishFlush is provided to wait for persisted acks on publish and sow_delete commands if the Client has a Store or will wait for a flush command to be acknowledged as processed ensuring all messages have reached the server. (AC-833)
  • The default batch size for all sow queries has been changed to 10. (AC-700)

Fixes and other changes:

  • Clients will no longer double-ack messages from a Queue when auto ack has been enabled and the code is also calling ack for the Message. (AC-489)
  • Clients will now automatically set an ack timeout when an application sets the ack batch size and the ack timeout is set to 0 (never timeout). When the ack timeout is 0, the Client will automatically set a default ack timeout of 1 second when the ack batch size is set. (z5223) (AC-666)
  • MessageStream objects returned for non-subscribe commands now properly mark themselves as closed when all expected acks have been returned. (AC-815)
  • The read timeout on a connection can no longer exceed the heartbeat interval if a heartbeat is set. (AC-819)
  • MessageStream objects produced by a Client with auto ack enabled will now ack the messages after the next message is requested. Previously, acks were sent as soon as messages were saved in the MessageStream which could lead to unprocessed messages being acked if a client processs exited with messages still held in the MessageStream. It could also completely drain a message queue since messages were being acked immediately upon arrival. (AC-825, AC-897)
  • LoggedBookmarkStore.prune now cleans up files that have only accumulated new persisted bookmarks. Previously, only a change in the last discarded bookmark would cause prune to modify the file. (z8434) (AC-831)
  • LoggedBookmarkStore.prune will now retry file delete and rename operations in case of slow file system updates. (z7614) (AC-836)
  • LoggedBookmarkStore.purge will throw a StoreException rather than a NullPointerException if the store was previously closed. (AC-877)
  • Fixed a deadlock condition during connectAndLogon when a client is disconnected before sending the initial heartbeat. (AC-885) (z9590)

Java version 5.2

Version 5.2.3.5 (2019-04-26)

Fixes and other changes:

  • Fix issue in LoggedBookmarkStore.prune() that could corrupt the bookmark store state of a subscription when there are two or more subscriptions in the store. (Z9263) (AC-876)
  • Improved LoggedBookmarkStore file recovery such that an IOException is thrown when a corrupted entry is detected in the middle of the file. Previously this exception was intentionally suppressed and the file append position was set to the last known good position in the file. This behavior is still preserved if corruption is detected on the file's last line because a truncated entry can be expected if an application process abruptly exits. (Z9263) (AC-874)

Version 5.2.3.4 (2019-01-25)

Fixes and other changes:

  • Fix race condition that leads to a hang while resizing a publish store when using it with a custom resize handler. (Z8769) (AC-853)

Version 5.2.3.3 (2019-01-10)

Fixes and other changes:

  • Fix issue where the two-argument logon() convenience method doesn't pass its Authenticator to the logon() implementation causing client authetication to fail. (Z8747) (AC-830)

Version 5.2.3.2 (2018-12-18)

Fixes and other changes:

  • Fix delay when reading large messages in large batches (approaching 200 MB) from a SOW query. This issue was caused by the JVM implementation of ByteBuffer.compact() performing unnecessary array copies. (Z8609) (AC-842)

Version 5.2.3.1 (2018-12-02)

Fixes and other changes:

  • The HAClient will no longer try to flush batched ack messages for a server queue during reconnect (AC-690).
  • The HAClient can no longer hang during the reconnect process due to flushing ack messages for a server queue during reconnect (z8539) (AC-840).
  • The LoggedBookmarkStore.prune function will now prune the file if persisted acks have been received and no messages discarded (z8434) (AC-831).

Version 5.2.3.0 (2018-08-21)

New features:

  • The Client.logon function can now be called with an options string, such as "ack_conflation=500ms" (AC-792).
  • The HAClient class now has setLogonOptions and getLogonOptions functions to set the options to be used for logon each time it's called (AC-792).
  • The VersionInfo class has been introduced to provide an encapsulated way to represent and compare server versions. Client.getServerVersionInfo() returns the new type (z7665) (AC-789).

Fixes and other changes:

  • The ack timeout set on a Client could fire inconsistently if no messages were arriving (z7427) (AC-795).

Version 5.2.2.1 (2018-07-26)

Fixes and other changes:

  • Clients consuming from a queue with an ack batch size > 1 and an ack batch timeout set previously could fail to send the acks on the timeout interval if no messages were being sent to the Client. (AC-795) (z7427)

Version 5.2.2.0 (2018-04-24)

Breaking changes:

  • The ConnectionStateListener class has been expanded to include: LoggedOn, HeartbeatInitiated, PublishReplayed, Resubscribed, and Shutdown states. Shutdown indicates that the Client has been disconnected and is not going to try to reconnect itself. A client shouldn't be used to execute AMPS server commands until after a listener has received either the LoggedOn state for a Client or the Resubscribed state for an HAClient. Note: enum value order and associated int values have also changed. (AC-457) (z3494, z6468)

New features:

  • Added Client.setDefaultMaxDepth, Client.getDefaultMaxDepth, MessageStream.getMaxDepth, and MessageStream.getDepth methods to control the max depth on new MessageStream objects created by the Client and to monitor the depth on the MessageStream. (AC-680) (z5557)
  • Added ability to bind outgoing connections to a server to a specific local address or port using ?bind=addr[:port] in the URI. (AC-701) (z6000)
  • Added an optional string argument to Client.ack and Message.ack methods to allow passing of an options string, such as "cancel". (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)

Fixes and other changes:

  • The client version is now additionally stored as a hard-coded value outside of the manifest for use when the client jar is rebuilt or combined into another jar and the manifest value is no longer available. (AC-754) (z5559)
  • Fix Client.unsubscribe to properly throw DisconnectedException if the Client is disconnected when calling the function. Previously, this could hang. (AC-760) (z6892)
  • Fix Client.unsubscribe to properly remove all MessageHandlers in place for subscriptions. (AC-768)
  • It is no longer possible for a handler to be incorrectly replaced in the Client when doing a pause or resume on an existing subscription. (AC-773)
  • The client version long form is now sent to the server during logon and returned from Client.getVersion(). (AC-775)

Version 5.2.1.4 (2017-12-27)

Fixes and other changes:

  • BlockPublishStore.store() now properly reclaims memory used and prevents the partial Message from being replayed. (AC-734)
  • Fixed a regression in MemorySubscriptionMananger since version 5.1.0.0 where the batch size was not saved with sow_and_subscribe requests, causing them to always be resubscribed with batch size 1. (Z6540) (AC-745)

Version 5.2.1.3 (2017-12-18)

Fixes and other changes:

  • LoggedBookmarkStore now correctly prunes its file when called after messages have been discarded. (Z6453) (AC-738)
  • The ack() methods on Message and Client are now a no-op if there is no bookmark provided. Also, the _client field on Message is no longer set on non-queue messages. (AC-733, AC-737)
  • The Client.getVersionAsInt() function now treats any portion of a version that is larger than 99 as 99. (AC-730)

Version 5.2.1.2 (2017-12-06)

Fixes and other changes:

  • Fixed a number of issues when using a Store on a Client that is consuming from an AMPS Queue. Issues included incorrect unpersisted count, incorrect duplicate detection, hangs while trying to flush the Store, large memory growth of the Store, and queue acks not being replayed from the Store during recovery. (AC-707) (AC-708) (AC-711) (AC-712)
  • Fix issue where a failing subscription could be saved in the subscription manager, which could result in persistent failures when reconnecting to AMPS and recovering subscriptions. (AC-709)
  • Add getter methods for the current resubscription timeout and the default resubscription timeout on the MemorySubscriptionManager. (AC-695)

Version 5.2.1.1 (2017-10-24)

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)
  • Fix LoggedBookmarkStore recovery for cases where a bookmark subscription never discarded a message and never received a persisted ack, possibly because a synchronous replication link is down and hasn't been downgraded to asynchronous. (AC-705)
  • Improved LoggedBookmarkStore prune operation so that it leaves the bookmark log file untouched if message discard state hasn't changed. (AC-684)

Version 5.2.1.0 (2017-06-14)

New features:

  • The bookmarkDeltaSubscribe function has been removed from Client as the AMPS server does not support this operation. (AC-646)
  • Added Client.setRetryOnDisconnect method that allows for commands being sent to the server to not retry if they fail the first time due to disconnection. (AC-635)

Fixes and other changes:

  • Command object reuse will no longer cause unrequested acks to be delivered to the message handler. (AC-645)
  • Fixed extremely rare race condition in BlockPublishStore that could cause a client application to hang indefinitely while publishing from multiple threads. (Z5108) (AC-659)

Version 5.2.0.2 (2017-05-08)

Fixes and other changes:

  • Fix LoggedBookmarkStore to prevent a possible slow recovery when the bookmark log file contains many undiscarded entries, usually after it has been pruned. (Z4974) (AC-647)

Version 5.2.0.1 (2017-03-06)

Fixes and other changes:

  • Fix BookmarkRingBuffer to prevent possible corruption when a LoggedBookmarkStore is recovered, and the file contains undiscarded messages. This problem was reported with large numbers of undiscarded messages (> 20K). (Z4447) (AC-612)

Version 5.2.0.0 (2017-02-09)

New features:

  • Added new options for 5.2.0.0 and newer AMPS servers (AC-584) (AC-605):
    • SkipN
    • Projection
    • Grouping

Fixes and other changes:

  • Fix OptionsField to correctly use position when removing trailing comma from options string. (AC-602)

Java version 5.1

Version 5.1.0.1 (2017-02-02)

Fixes and other changes:

  • Fix BookmarkRingBuffer to prevent possible null pointer exception when messages in a LoggedBookmarkStore are not discarded during multiple recoveries from the file. (Z4447) (AC-603)

Version 5.1.0.0 (2016-12-29)

Breaking changes:

  • Added throws Exception specifier to reportFailure in ServerChooser and DefaultServerChooser to allow implementations to give up when a failure is reported. (Z3372) (AC-448)
  • Support for Java 6 has been removed. (AC-464)

New features:

  • Added new function setResubscriptionTimeout to MemorySubscriptionManager class to change a non-static value used for timeouts during resubscription. Previously, there was only a single static value. (Z3372) (AC-461)
  • Added new get functions to Client for heartbeat interval and read timeout. (Z3720) (AC-508)
  • Added new options for 5.1.0.0 and newer AMPS servers (AC-532) (AC-543):
    • Conflation
    • ConflationKey
    • FullyDurable
    • RateMaxGap
  • Added new function purge(subId) to the BookmarkStore interface and all implementations. This function will completely remove all records for the given subscription id from the store. (Z4087) (AC-540)

Fixes and other changes:

  • Fix bookmark store classes so a lock is not held while the resize handler is called. This allows other threads to discard messages. (AC-444)
  • Reduce memory footprint associated with each distinct subscription when using HAClient and/or the MemorySubscriptionManager. (AC-469)
  • Allow Client.setHeartbeat() to be called before connecting. (AC-509)
  • Options no longer have a trailing , when sent to the server. (AC-431)
  • Prevent multiple threads from calling HAClient.connectAndLogon at the same time. (AC-449)
  • The MemorySubscriptionManager.DefaultResubscriptionTimeout has been changed to 0, or no timeout. (Z3372) (AC-460)
  • Updated LoggedBookmarkStore.prune function to be more complete in what is saved in the pruned file. There was a small possibility for duplicate messages being delivered. (AC-479) (AC-523)
  • Differentiate NotEntitledException message between logon and other commands. (AC-511)
  • Fix MemorySubscriptionManager to reset state properly if there is an exception during resubscribe. Previously, it could produce a deadlock (Z3928) (AC-519)
  • Ensure that bookmark store classes checks for duplicate messages uses unsigned values when values are larger than Long.MAX_VALUE. (AC-529)

Java version 5.0

Version 5.0.1.6 (2016-11-29)

Fixes and other changes:

  • Fix issue in LoggedBookmarkStore where calling prune() could lead to a deadlock if another thread simultaneously called log(), discard(), or persisted() on the same store. (Z4212) (AC-548)

Version 5.0.1.5 (2016-11-28)

Fixes and other changes:

  • Fix issue that causes a MessageStream object to be leaked when an operation throws an exception (for example, due to timing out) before the MessageStream is returned to the caller. (Z4107) (AC-544)

Version 5.0.1.4 (2016-10-04)

Fixes and other changes:

  • Fix issue that could cause a deadlock in the MemorySubscriptionManager when an exception occurred during resubscription after a disconnect at the same time a new subscription was being recorded. (Z3928) (AC-519)

Version 5.0.1.3 (2016-08-10)

Fixes and other changes:

  • Fix issue where an ack would be delivered to the last chance message handler when acking a message from a queue. (Z3513) (AC-472)
  • Fix bug where a Client with a publish store could have its publish messages seen as duplicates by the server if the client was also acking messages from a queue. (Z3609) (AC-490)
  • Fix bug in Client that could cause a LoggedBookmarkStore to have an incorrect value for most recent for AMPS servers version 4.0.0.0 and above in cases where the bookmark store has been written with only persisted acks. (AC-447)

Version 5.0.1.2 (2016-05-12)

Fixes and other changes:

  • Fix bug in BookmarkRingBuffer where the ring buffer would continue calling the ResizeHandler if the buffer had been completely emptied by the call and the ResizeHandler returns false.

Version 5.0.1.1 (2016-05-09)

Fixes and other changes:

  • Fix problem in CompositeMessageParser that could cause an exception to be thrown when parsing large messages. (Z3312)

Version 5.0.1.0 (2016-05-03)

Additional functionality:

  • This release adds support for secure socket layer (SSL) encryption of connections to AMPS, supported in 5.0.0.0 and higher versions of the AMPS server. See the developer guide for information on adding SSL support to your applications. See the most current AMPS User Guide and AMPS Configuration Reference for creating a Transport that uses SSL.

Fixes and other changes:

  • Fix FailedWriteHandlerV4Compat to correctly handle the case where an error ack does not contain a sequence number. (Z3245) (AC-438)
  • Fix Client to add both command id and sub id to the MessageRouter when acks are requested on a Command and those ids are different. (Z3210)
  • Fix bug in LoggedBookmarkStore.prune() that could result in an invalid bookmarks in the store. (Z3165, Z3268) (AC-439)

Version 5.0.0.1 (2016-03-31):

Fixes and other changes:

  • Fix publish store so that an empty publish store connecting to a server will properly assign sequence numbers after receiving a sequence number in the logon acknowledgement. (Z3122)
  • Fix publish store to properly calculate the CRC value for entries when used by multiple threads.
  • Fix HybridPublishStore to ensure messages are not missed during replay if there is a simultaneous write to the store that causes the store to move messages from memory to the file.
  • Client.getVersion now only looks for amps_client instead of the full jar file name to provide the correct version when the client is packaged in a jar file with a different name.

Version 5.0.0.0 (2016-03-01):

Breaking changes:

  • Removed AMPS_1 and AMPS_2 constants from Client.Version. This client does not support AMPS versions 1.x or 2.x.
  • Removed the isV1 parameter from the constructor of FIXMessage.
  • Client will now respond to authentication challenges with user id sent by the server in its response. (Z2993)
  • Removed the following deprecated fields from Message (AC-294):
    • MaxMessages
    • MessageId
    • SendEmpties
    • SendMatchingIds
    • SendOOF

New features:

  • This release adds support for AMPS message queue functionality, including convenience functions for acknowledging messages and support for automatic acknowledgement. See the Developer Guide for details.
  • MessageStream now supports client side conflation. When enabled, client side conflation replaces unprocessed messages with the same SowKey in the queue underlying the message stream.
  • Added NoTopic to Message.Reason.
  • The version sent to AMPS in logon is now getVersion() + ":java" to aid in debugging. (AC-385)
  • Added addMessageHandler and removeMessageHandler functions to Client so the non-blocking version of send can be used and results will still be handled. (AC-333)
  • Added is___Null() methods to Message for every header field. (AC-107)
  • Store implementations now store ack type in addition to all previously saved values. PublishStore and HybridPublishStore have a new file format and will not work with store files from previous versions.
  • Store interface now only contains one store() method which accepts a Message.
  • Store classes now must determine and set the sequence number on Message objects that saved. This makes sequencing easier.
  • Store.Buffer interface now has functions to put a byte array with an offset and a length and to get directly into a Field given a length.
  • StoreReplayer interface now only contains one execute() method which accepts a Message.
  • Removed interfaces StoreEx, StoreWithKeys, and StoreReplayerWithKeys.
  • FailedWriteHandler interface now only contains one execute() method which accepts a Message and a reason.
  • FailedWriteHandlerV4 interface is the new name for the old FailedWriteHandler interface. To continue using an existing FailedWriteHandler with no changes to the implementation, change the base class to FailedWriteHandlerV4.
  • PublishStore will recover up to corrupt messages, then clear corrupt data before throwing an exception so that the store and its file are recoverable. (AC-404) (Z2458)
  • PublishStore has a new function truncateOnClose(boolean), which, if set to true will cause an empty PublishStore to attempt to truncate its file to initialSize blocks when it is closed. (AC-405) (Z2255)
  • Added Pause, Resume, and Rate() to Message.Options for building Command options strings. (AC-406)
  • MemoryPublishStore has been upgraded to handle proper sending of pause and resume subscriptions, making sure that resume groups resume together.

Fixes and other changes:

  • Changed accessibility of CommandId.CommandId(byte[]) and CommandId.CommandId(byte[],int,int) to public. (Z1643)
  • Removed next() method from ServerChooser interface. (AC-114)
  • Changed default encoding of Field to UTF-8. (AC-304)
  • Greater consistency in calling user supplied exception listener instead of silently "swallowing up" internal Exceptions. (AC-301)
  • Call discardUpTo on the publish store when AMPS returns a persisted ack indicating that the message is either a duplicate or the publisher is not entitled. (Z1640) (AC-329)
  • Added SowKey field to Command and Message classes for publishing to a SOW topic that is externally keyed. Added StoreWithKeys interface that takes a Message. (AC-337)
  • A message stored in the publish store won't attempt to be resent after a reconnect because the store should have already replayed it. (AC-328)
  • Added get/set LogonCorrelationData to Client to provide a base64 field that can be used as additional correlation information about a client after it logs onto AMPS. (Z1539) (AC-311)
  • Added Timestamp, NoSowKey, and Cancel to Message.Options for building Command options strings. (Z1669) (AC-356)
  • Removed unused exception from HybridPublishStore(string, int) constructor. (Z1999)
  • Throw an AlreadyConnectedException when attempting to set a publish or bookmark store on a client that is already connected as this is undefined behavior. (AC-306)
  • Throw an AlreadyConnectedException or DisconnectedException when attempting to call logon on an HAClient which does connect and logon as a single operation. (AC-306)
  • The FailedWriteHandler will now be called in all cases of a persisted ack being returned for a failure. If there is a PublishStore in place, the saved message will provide the data. Without a PublishStore, only the sequence number, if there is one, and the reason will be provided to the handler. (AC-339)
  • Fixed Message._copyTo to properly copy the original Message when the original doesn't have an underlying buffer with the entire Message.
  • SubscriptionManager interface now takes a Message in the subscribe function instead specific fields. (AC-336)
  • Fixed ExponentialDelayStrategy to never return a delay larger than the maximum delay set on the strategy. (Z2190)
  • Fixed BookmarkStore classes to correctly serialize publisher id and sequence as unsigned long values. (Z2052)
  • Changed Client.execute function to work better with publish and delta_publish commands. If no acks are requested, an empty MessageStream is returned. If acks are requested, a command id is added before the message is sent. (AC-300)
  • Changed Client.execute and Client.executeAsync to return all acks that are set on the Command object to the MessageStream of MessageHandler. Previously, acks that are used internally in the Client (for example, processed acks) were blocked from being returned. (AC-332)
  • Allow custom processing of hearbeat messages through the last-chance message handler. (Z2340)
  • Add new, optional "maximum" parameter to FixedDelayStrategy. (Z2030)
  • Throw DisconnectedException when executing commands on a client that is not currently connected. (Z2503)
  • Command.prepare() is now permitted to throw AMPSException. (Z2503)
  • Client.allocateMessage() is now permitted to throw DisconnectedException. (Z2503)
  • Fix to correctly set subId for MessageStream. (Z2528)
  • Ensure that messages are saved to publish store and sent sequentially when multiple threads are calling publish and sowDelete functions on the same client at the same time. (Z1617) (AC-217)
  • No longer spin while waiting for a connect() to finish. (Z2932)

Java version 4.3

Version 4.3.3.0 (2016-08-05)

Breaking changes:

  • Added throws Exception specifier to reportFailure in ServerChooser and DefaultServerChooser to allow implementations to give up when a failure is reported. (Z3372) (AC-448)

New features:

  • Added new function setResubscriptionTimeout to MemorySubscriptionManager class to change a non-static value used for timeouts during resubscription. Previously, there was only a single static value. (Z3372) (AC-461)

Fixes and other changes:

  • Fix bug in LoggedBookmarkStore with server versions 3.8.0.0 - 3.9.X where the internal file handle could be left open and cause prune to fail when replacing the file. (Z3428) (AC-459)
  • Changed MemorySubscriptionManager default timeout to 0. A bug was introduced in 4.0.0.0 that caused MemorySubscriptionManager to ignore the default timeout and use 0. The bug in 4.0.0.0 was fixed in 4.3.1.9 incidental to another fix, which caused a behavioral change from 4.0.0.0. This release reverts to the 4.0.0.0 default timeout behavior. (Z3372) (AC-460)
  • HAClient.connectAndLogon is now thread safe to prevent the possibility of a deadlock. (Z3372) (AC-449)
  • Fix bug in Client where sowDelete commands executed with a publish store in place were not requesting a persisted ack, which could cause the store to never be empty if sow_delete was the last command in the store. (AC-480)
  • Fix bug in Client where a deadlock could occur between the Client receive thread and a send thread in rare cases where both threads detect a disconnect at the same time.

Version 4.3.1.10 (2016-05-11)

Fixes and other changes:

  • Fixed Client to register the message handler for a Command for all acks that are requested. (Z3210)
  • Fix bug in LoggedBookmarkStore.prune that could result in an invalid bookmark in the store. (Z3165, Z3268) (AC-439)

Version 4.3.1.9 (2016-02-23)

Fixes and other changes:

  • Fixed race condition that could cause an incorrect SubId in use error when a subscription is placed during a reconnect. (Z2915)
  • Fixed Message._copyTo to properly copy Message objects where the individual Fields don't all share a single, large buffer. This applies primarily to Message objects created by the user, not ones received from the server.

Version 4.3.1.8 (2015-11-03)

Fixes and other changes:

  • Fixed Client to call FailedWriteHandler for any publish failure ack. Previously, only not entitled and duplicate acks would invoke the FailedWriteHandler. (Z2372)
  • Fixed BlockPublishStore to not update the crc for a null value. (Z2367)

Version 4.3.1.7 (2015-10-20)

Fixes and other changes:

  • Fixed CompositeMessageParser to correctly read all message sizes. There was an issue with some sizes due to Java promotion of byte to int for bit-shift operations that caused some values to be read incorrectly. (Z2181)
  • Fix MemorySubscriptionManager concurrency issues to prevent multiple threads accessing the internal HashMap and also handle race conditions that can occur during resubscription after a reconnect. (Z2287)
  • Fix Client.send function to register the MessageHandler with the sub id or query id rather than the command id for subscribe and sow functions.

Version 4.3.1.6 (2015-10-03)

Fixes and other changes:

  • Fixed CompositeMessageParser to correctly read message sizes larger than 2^24. (Z2181)
  • Fix MemorySubscriptionManager to create its own copy of the subId to prevent it from having multiple subscriptions keyed by the same object. (Z2266)

Version 4.3.1.5 (2015-09-28)

Fixes and other changes:

  • Fixed BookmarkStore classes to correctly serialize publisher id and sequence number as unsigned long values. (Z2052)
  • Fixed ExponentialDelayStrategy to never return a delay larger than the maximum delay set on the strategy, even when using jitter. (Z2190)
  • Fixed LoggedBookmarkStore.prune to not attempt to seek to a negative position in the file if the file is empty. (Z2204)

Version 4.3.1.4 (2015-08-28)

Fixes and other changes:

  • Change amps/json protocol implementation to support returning a Password field to custom Authenticator objects. (Z2087)

Version 4.3.1.3 (2015-07-28)

Fixes and other changes:

  • Change all Store implementations to set the initial sequence number to a large value based on currentTimeMillis. This prevents backtracking in sequence numbers when simultaneous server and client failures occur and replication is in use. (Z1986)
  • Fix LongField to correctly return long values larger than the maximum value of an int.

Version 4.3.1.2 (2015-07-03)

Fixes and other changes:

  • Fix MessageStream to prevent hangs and OOM when used with HAClient. The HAClient will no longer silently resubscribe a MessageStream after the MessageStream ends due to the client disconnecting. Instead, if the application wants to resume processing after failover, the application can reissue the subscribe command to get a new MessageStream. If your application has been using HAClient with MessageStream, review your usage to verify that your application expects the MessageStream to end correctly. (Z1875)
  • Continue to wait for a processed ack until timeout is exceeded, even when an InterruptedException is thrown. (Z1918)

Version 4.3.1.1 (2015-06-08)

Fixes and other changes:

  • Correct distribution to include source JAR file. (Z1838)

Version 4.3.1.0 (2015-06-03)

This version of the AMPS Java client introduces and changes functionality.

Compatibility note:

  • Message setters now return the current Message to allow setter calls to be easily chained together. If your application relies on the return type of these calls to be void, you may need to adapt your application.

Fixes and other changes:

  • Added CompositeMessageBuilder and CompositeMessageParser classes for working with composite message types.
  • Added the ReconnectDelayStrategy interface that allows an application to specify how long the HAClient waits between reconnection attempts. The client provides two implementations, ExponentialDelayStrategy and FixedDelayStrategy.
  • Changed accessibility of CommandId.CommandId(byte[]) and CommandId.CommandId(byte[],int,int) to public. (Z1643)
  • Removed next() method from ServerChooser interface. This method was not called by the AMPS client. Implementations that provide the method should see no difference in behavior. (AC-114)
  • Added is___Null() methods to Message for every header field. (AC-107)
  • Changed default encoding of Field to UTF-8. (AC-304)
  • Greater consistency in calling user supplied exception listener instead of silently "swallowing up" internal Exceptions. (AC-301, Z1642, Z1495)
  • Call discardUpTo on the publish store when AMPS returns a persisted ack indicating that the message is either a duplicate or the publisher is not entitled. (Z1640) (AC-329)
  • Added SowKey field to Command and Message classes for publishing to a SOW topic that is externally keyed. Added StoreWithKeys interface that takes a Message. (AC-337)
  • A message stored in the publish store won't attempt to be resent after a reconnect because the store should have already replayed it. (AC-328)
  • Added get/set LogonCorrelationData to Client to provide a base64 field that can be used as additional correlation information about a client after it logs onto AMPS. (Z1539, AC-311)
  • Added Timestamp and NoSowKey to Message.Options for building Command options strings. (Z1669, AC-356)
  • Message setters now return the current Message to allow setter calls to be easily chained together.

Java version 4.0

Version 4.0.1.4 (2015-05-22)

Fixes and other changes:

  • Fix MemorySubscriptionManager to not resubscribe with the replace option. (Z1791, AC-354)
  • Fix LoggedBookmarkStore recovery when the server version is 3.8x or 3.9x. (Z1724)
  • Fix to correctly set the client sequence number in cases where the saved sequence number on the server is ahead of the sequence number in the client publish store (this defect was introduced in 4.0.1.0). (Z1803)

Version 4.0.1.3 (2015-05-18)

Fixes and other changes:

  • Fix handling of empty header fields that could cause invalid JSON in amps protocol headers. This resulted in failures when the HAClient resubscribed after failover. (Z1762, Z1764)
  • Add MemoryPublishStore.BLOCK_SIZE as a public static data member. This allows you to query the block size used for the class. (Z1587)
  • Bookmark stores now use EPOCH or the most recently seen bookmark for each publisher for MOST_RECENT when no persisted ack has been received for a subscription. Previously, stores would return the last discarded bookmark when no persisted ack had been received. (Z1724)
  • The prune() method on LoggedBookMarkStore may now throw a StoreException.

Version 4.0.1.2 (2015-05-01)

Fixes and other changes:

  • Fixes race condition in Client publish(), sowAndDeltaSubscribe(), sowDelete(), sowDeleteByKeys() that could result in returning an incorrect or NULL command ID or a sequence number of 0. (Z1700)

Version 4.0.1.1 (2015-04-24)

Fixes and other changes:

  • Fixes race condition in Client subscribe methods where the returned CommandId can be reset before results are read. (Z1700)
  • Added Client.getExceptionListener(), getFailedWriteHandler() and getDuplicateMessageHandler(). (Z1689,AC-331)

Version 4.0.1.0 (2015-03-12)

Fixes and other changes:

  • Changed MessageStream.next() to throw NoSuchElementException instead of returning null if it is called after hasNext() returns false (Z1496)
  • Throw an exception when an "invalid bookmark" error is returned from the server. (Z1543)
  • Added a prune() function to LoggedBookmarkStore that will attempt to trim the underlying file down to only current state. (Z1227)
  • PublishStore now remembers the last sequence number even if the store is empty. Previously, an empty store meant the client would start with the sequence number provided by the server, which could be 0 if the server's clients.ack file had been removed possibly leading to messages being perceived as duplicates by replication destinations. (Z1227)
  • The timeout argument was being ignored for Client.bookmarkSubscribe() and Client.bookmarkDeltaSubscribe() functions.

Version 4.0.0.3 (2015-02-25)

Fixes and other changes:

  • Fixed failure to reconnect after a disconnect, connection failure, and then successful reconnect, and subsequent disconnect (Z1518).

Version 4.0.0.2 (2015-02-05):

Fixes and other changes:

  • SPARK: Add "-proto" as a synonym for "-prot" and use "-proto" in spark help messages. (AC-295)
  • Updated compatibility notes for 4.0.0.0. (Z1427)
  • Fixed Client version lookup to use ClassLoader instead of URLClassLoader. (Z1447)

Version 4.0.0.1 (2015-01-20)

Compatibility:

  • Added new method ServerChooser.getError() for providing detailed error information. Classes that implement this interface directly must provide an implementation. (AC-270)

Fixes and other changes:

  • Fixed possible deadlock in HAClient when a logon failure occurs during connectAndLogon(). (Z1384)
  • Added new method Client.getDisconnectHandler().
  • SPARK: Added check for JRE 1.6+ to spark shell script. (Z1393)
  • SPARK: Fix documentation of the spark ping command to include specifying the protocol to match the destination. (Z1385)
  • SPARK: Fix outdated usage message. (Z1393)
  • SPARK: Include note that -type is treated as a synonym for -prot. (Z1393)
  • Updated compatibility notes for 4.0.0.0.

Version 4.0.0.0 (2014-12-02)

This version of the AMPS Java Client is a major update to the programming interface. It introduces major new functionality, and is not fully source compatible with previous versions. See the section on "Updating Applications to 4.0.0.0" in this HISTORY file for information on updating applications.

This release contains the following breaking changes:

  • BREAKING CHANGE: options fields are now strings, not Integers. Multiple options are specified by listing each option delimited with comma. To support this change, Message.Options has been changed from an enum to a class holding constant strings.
  • BREAKING CHANGE: the PublishedDuplicateHandler has been renamed to FailedWriteHandler, and it's publishedDuplicate method has been renamed to failedWrite and given an additional parameter, reason. This method is called whenever a logged publish or sow_delete fails to be written on the server, due to being a duplicate or not entitled.
  • BREAKING CHANGE: The AMPS Java Client now requires JRE 1.6 or later.
  • BREAKING CHANGE: Methods that execute a command against the server that did not previously throw AMPSException may now throw AMPSException (publish, deltaPublish, startTimer, stopTimer).

This version introduces the following new features and fixes:

  • Add new Command class to facilitate more flexible and easier execution of AMPS commands, along with execute and executeAsync methods on Client to execute a Command.
  • Include the AMPS Command Reference in the client distribution to provide a guide to using the new Command class.
  • Add new MessageStream class returned by some methods on Client to allow for easier iteration of results from AMPS subscriptions, queries and commands.
  • Transcode strings to UTF-8, not ISO-8859-1, when sending JSON and XML messages (AMPS280)
  • Removed 22-character limit from command, subscription, and query IDs (AC222)
  • Refactored TCPTransport and TCPTransportImpl for easier creation of mock transports for unit testing. (AC238)
  • Added new sowDeleteByKeys and sowDeleteByData methods for invoking sow_delete in AMPS with SOWKeys and with exemplar data, respectively.
  • Corrected parsing of Password field in XML protocol. (AC237)
  • Corrected parsing of failure reasons returned by AMPS in the "Reason" field. (AC226)
  • Added bookmarkDeltaSubscribe method to Client. (AC215)
  • Removed the erroneous SendEmpties option from Message.Options.
  • Client now implements java.io.Closeable, so that Client may be used in a try-with-resources statement.
  • Improve performance of processing replayed messages after a disconnect and resubscribe. (AC242, AC243, AC134)
  • Record sow_delete operations in publish stores so that, during replay, sow_delete and publish messages are replayed in the same order they were originally sent. (AC207)
  • Disallow subscriptions with the replace option when no subscription ID is passed, to help prevent programming errors with this option. (AC153)
  • Ensure the appropriate subscription ID is used for bookmark logging when multiple subscriptions to the same topic are placed.
  • Add RecordsInserted, RecordsUpdated, and OrderBy fields to Message. (AC106)
  • Add new ConnectionStateListener interface for notification of connection and disconnection from an AMPS Client.
  • Prevent accidental disconnection during long SOW queries when using heartbeat functionality.
  • Add CDATA escaping to topic and filter fields for XML protocol. (AC216)
  • Use and resubscribe with multiple bookmarks to avoid missing messages when failing over between replication pairs.
  • Increased robustness of publishFlush() method using new flush command on the AMPS server when available. (AC182)
  • Renamed "message type" to "protocol" throughout the clients for consistency with AMPS 4.0 terminology.
  • Renamed setUnhandledMessageHandler to setLastChanceMessageHandler. (AC197)
  • Cause all sowDelete methods to request a "stats" ack from the server.
  • Added support for orderby, bookmark, and topN arguments to sow, sowAndSubscribe, and sowAndDeltaSubscribe.
  • Added optional subId parameter to all subscription methods on Client.
  • Fixed possible ArrayIndexOutOfBoundsException in BookmarkRingBuffer that could happen during a resize. (Z1272)

Updating Applications to 4.0.0.0

Starting with version 4.0.0.0, there is no longer an integer representation of options for AMPS commands. Instead, options are always represented as string values. Methods which previously accepted an integer for options have now been updated to use a string.

For example, if your code sets the oof and send_keys option on a sowAndSubscribe command using the following code:

        Message.Options.OOF | Message.Options.SendKeys

You would change this to use options as strings, as follows:

        Message.Options.OOF + Message.Options.SendKeys

Or simply use the literal values of the options:

        "oof,send_keys"

Replace references to MessageType with Protocol. For example, the class previously named FixMessageType is now named FIXProtocol.

Version 3.8.0.11 (2014-09-16)

  • Fix inconsistency in options for sending empty messages on delta subscriptions. This change adds a NoEmpties option and ignores the SendEmpties option (SendEmpties is the default if no option is specified). (Z1007)
  • The password field returned from the server is now correctly parsed for XML messages (Z1007)
  • Improve handling of reason codes returned by the server. Parsing is more accurate. If the server returns an unknown reason, the client now throws a CommandException with the text of the reason. (AC-226)
  • Fix replay behavior of RingBookmarkStore when receiving persisted acks. Previously, messages could overwrite the last persisted bookmark, causing replays to begin at EPOCH even when MOST_RECENT was specified. (Z997)

Version 3.8.0.10 (2014-08-26)

  • On reconnect, HAClient now resubscribes with the same options used to place the initial subscription when using sowAndDeltaSubscribe. (Z987)

Version 3.8.0.9 (2014-07-14)

  • spark: add AuthenticatorFactory interface and -authenticator option to spark, enabling the use of custom authenticators.

  • spark: add -timeout option to specify a command timeout (in milliseconds). This option applies to subscribe and all sow* commands.

  • Publish stores now store message expiration. This fix includes a change to the file format for file-based publish stores. This version of the client will correctly read files from previous versions of the client. However, previous versions of the client cannot read publish store files created by version 3.8.0.9 and later of the client. (Z880)

  • Messages now correctly set the options string when setting multiple options with setOptions(int) overload.

  • Client has new function getServerVersion to return the version of the connected AMPS Server. This function returns a numeric value with the pattern Major Minor Maintenance Hotfix

    Two digits are available for each part of the version. For example, AMPS server version 3.8.1.5 will return 3080105. This is supported for all versions of AMPS 3.8 and later. If the client is connected to an earlier version of AMPS or not connected, this function will return 0. (Z884)

  • Client has new function getVersionAsInt to convert a version String to an int for comparison with what is returned from getServerVersion. This function will also work with shortened version strings, such as "3.8", which will return 3080000. (Z884)

Version 3.8.0.8 (2014-06-13)

  • Applications that use a file based PublishStore no longer lose messages when the application is restarted with unpublished messages. Previously, errors in recovery would cause unpublished messages to be lost. (AC200)

  • Applications that use a Store for publishing will no longer lose the first published message after recovery. Previously, if the store had exactly 1 unsent message during recovery, the client would reuse a message sequence number, making the message appear to be a duplicate. (AC200)

Version 3.8.0.7 (2014-05-26)

  • Prevent most IOExceptions in LoggedBookmarkStore.recover() to allow the store to recover up to the point where the error occurs in the file.

Version 3.8.0.6 (2014-05-20)

  • Prevent a NullPointerException in LoggedBookmarkStore when the store needs to resize while it is still holding messages from a previous logon that have not been delivered from the server. (J195)

Version 3.8.0.5 (2014-05-19)

  • Prevent a rare, timing-dependent NullPointerException by ensuring that a reader thread is fully shut down before starting a new reader thread. (Z686)

Version 3.8.0.4 (2014-05-13)

  • Allow custom Transport implementations to be successfully registered and used via the TransportFactory class. (Z782)
  • Add reset method to TransportFactory for easier testing of custom Transport implementations. (Z782)
  • Prevent a NullPointerException from LoggedBookmarkStore when trying to discard a bookmark during failover and a rare sequence of events happens with specific timing. (Z686)
  • Prevent a NullPointerException from MemoryBookmarkStore when isDiscarded is called during recovery and certain other rare conditions exist involving the discarded state of various bookmarks in the store. (Z795)

Version 3.8.0.3 (2014-04-30)

  • No longer produce ArrayIndexOutOfBoundsException while processing duplicate messages with a bookmark store. This problem was dependent on both a sequence of events and how the bookmark store kept processed bookmarks in memory. The problem could very rarely occur when the client received a message that had not been discarded, then received a number of discarded messages. (Z761)
  • Prevent hang on program exit. When one thread was trying to reconnect and an explicit call to disconnect() occurred on another thread, the client could enter a state where a call to disconnect() would not return.(Z753)

Version 3.8.0.2 (2014-04-23)

  • Prevent outbound message corruption or null pointer exception. This could occur in rare cases when using heartbeat and sending messages to AMPS.

Version 3.8.0.1 (2014-04-22)

  • Prevent null pointer exception. This could occur in rare cases when a client is both a publisher and a subscriber, is using a store for both the publication and subscription, and is communicating with a server version 3.8 or later.
  • Message discards now correctly handle bookmark store resize in cases that could previously write to the wrong record, causing the wrong entry to be discarded.
  • No longer consume excessive memory when recovering a large LoggedBookmarkStore. (Z605, Z746)

Version 3.8.0.0 (2014-03-10)

  • Change version number so that major/minor version matches server release. There are no AMPS Java client releases versioned 3.3 through 3.7.
  • Message.getSowKey() on XML messages no longer incorrectly adds a trailing double-quote character to the key returned.
  • Improve the interface for replacement subscriptions. Client subscribe, bookmarkSubscribe, deltaSubscribe, and bookmarkDeltaSubscribe now allow a replacement subscription to be made using those functions. These functions update SubscriptionManager when replacing a subscription. SubscriptionManager also correctly handles resubscribes with replacement filters.
  • Protect against unbounded store growth. Added setResizeHandler functions to the bookmark and publish store classes. This function allows you to set a callback that is called when a store is resized. Your callback can detect when a store is growing too large and handle the problem.
  • Protect against duplicate and lost messages when using bookmark live subscription and failing over. This adds a persisted() function to BookmarkStore classes as further protection against this problem.
  • Request persisted acks for bookmark subscription from AMPS server versions that support it. This ties into the persisted addition on the BookmarkStore to fully guarantee all messages are seen during a failover when using a bookmark live subscription.
  • Get AMPS server version during logon. This allows the client to correctly handle any version-specific differences in behavior, and take advantage of features that are only available on more recent server releases.
  • Remove spurious "Disconnect in progress" that could be sent to an exception listener during an intentional disconnect from the server.
  • Empty XML message body returns empty string instead of SOAP Envelope tags when getData() is used to inspect contents.

After version 3.2, the client version number was changed to match the server version number. There were no releases numbered 3.3 through 3.7.

Version 3.2.0.5 (2013-09-23)

  • Added new sowDeleteByKeys() method to Client.
  • Fixed possible message corruption caused by responding to a heartbeat message using the same message object in the client.
  • Added the ability to provide a username for spark by passing in user@host:port for the -server flag. This will supercede using the system user name.

Version 3.2.0.4 (2013-09-13)

  • Add close() method to LoggedBookmarkStore.
  • Close LoggedBookmarkStore automatically when a corrupt store file fails to be recovered, instead of leaving the file open.
  • Eliminated spurious client-side connection closure when java select() returned 0, but data is available to read.
  • Eliminated spurious `subid in use' error seen in the server log when a connection failure occurs in the midst of resubscribing after a prior connection failure.
  • Change encoding of Options field in SOAP messages to match the server.

Version 3.2.0.3 (2013-07-30)

  • Fix bookmark store duplicate detection bug where out of order discarding may result in duplicates delivered to the program's message handler after recovery.
  • Speed up handling of first message in a bookmark subscription.
  • Added new constructor to bookmark stores to allow setting a target number of subscriptions, so that internal ring buffers may be pre-allocated for performance. With the original constructor, we default to creating one internal ring buffer (enough for one subscription.)

Version 3.2.0.2 (2013-07-09)

  • Do not wait reconnectTimeout on first HAClient connection.
  • Fixed LoggedBookmarkStore recovery bug where an undiscarded message at program exit causes future recovery to always occur from that point, even if that message is later discarded.
  • Changed HADisconnectHandler to make sure both 1-argument and 2-argument variants of invoke() are always called when handling a disconnect, in case of a subclass that only overrides one of those two.

Version 3.2.0.1 (2013-05-16)

  • Fixed bug where a successful call to logon() may, on occasion, fail or hang if it occurs immediately after a disconnect and reconnect event.

Version 3.2.0.0 (2013-03-08)

  • Added -rate flag to spark.
  • Added new HAClient and associated classes for high availability.
  • Fixed bug whereby multiple concurrent invocations of sow(), sowAndSubscribe(), etc. could result in spurious TimedOutException.
  • Added new PublishStore, BookmarkStore implementations complementing HAClient functionality.
  • Fixed hang when using spark with sow_delete and an XML message type.

Version 3.1.0.5 (2012-09-19)

  • Fix issue with null Authenticator passed to logon().
  • Added version number to README file.
  • Changed error message of NotEntitledException to include the the topic and a valid username.

Version 3.1.0.4 (2012-09-14)

  • Added NotEntitledException.

Version 3.1.0.1 (2012-08-22)

  • Send all queued data before closing, so that incomplete data is not sent to the server when disconnecting.

Version 3.1.0.0 (2012-08-16)

  • Change send(Message m) to not send cached message.
  • Added support for custom authentication modules.
  • Added support for TCP transport options.
  • Fixed numerous shutdown/reconnect hangs and race conditions.