Skip to main content

HISTORY notes for AMPS C# Client

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

C# version 5.3

Version 5.3.5.0 (XXXX-XX-XX)

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)

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)
  • 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)
  • 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)
  • 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.0 (2025-01-30)

New features:

  • TCPS connection protocols now uses SslProtocols.None instead of Default if not explicitly set on the TCPTransport class. On older versions of .NET Framework where None is not supported, it will try descending levels of protocol security starting with Tls12 down to Ssl3. (AC-1064) (z12407)
  • 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 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)
  • Added getNameHashValue to Client to return the client's hash id as a ulong as opposed to the string returned from getNameHash. (AC-1169)
  • Added TransportFilterModifiable interface that can be used for a transport filter that modifies existing bytes in messages in or out of the transport without changing the length. (AC-1170)
  • 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)
  • Removed unused exception classes InvalidProtocolException, InvalidTransportException, TransportException, and PublishFilterException. (AC-1310)

Fixes and other changes:

  • MemoryPublishStore will now correctly start with the correct initial size of 10,000 2KB blocks, and not immediately resize. (z6392) (AC-765)
  • Allow CommandException from logon so that logon failures such as invalid message type are correctly seen. (AC-1122)
  • Fix queue ack messages that aren't cancel or expire to be retried if there was a connection issue during first send attempt. (AC-1151)
  • Fix issue where an exception thrown by the exception listener callback can cause the client to stop reconnecting or cause the client's background reader thread to terminate. (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. (AC-1154)
  • Fix issue in LoggedBookmarkStore.purge where the bookmark store file would have its version number overwritten, corrupting the file. (AC-1161)
  • Changed publish store classes to throw a StoreException if they attempt to resize beyond maximum array size. (AC-1201) (z14395)
  • Ack timeout can't be set to 0 if ack batch size > 1. (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)
  • Fix regression introduced in AMPS C# 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). (Z15340) (AC-1218)
  • Fixed possible hang or missed acks when a disconnect occurred while sending sow_delete commands. (z8567) (AC-1220)
  • 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)
  • 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)
  • Allow tcp_keepalive to be turned off in URI parameters. It remains on by default, but no longer overrides turning it off. (AC-1254)
  • Fix deadlock that can occur when calling HAClient.connectAndLogon() on a client that has already had that method called and happens to be trying to reconnect at the same time. This invalid practice has been corrected to throw AlreadyConnectedException on subsequent calls made without first calling disconnect(). (AC-1258)
  • Prevent any commands from being sent to the server while waiting for the logon ack and ensure no duplication with commands that are 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)
  • Fix compiler warnings from building with .NET 8. (AC-1277)
  • 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)
  • Fix possible deadlock when using a ConflatingRecoveryPointAdapter with a DynamicRecoveryPoint that could occur if the bookmark store attempted to update the adapter while the adapter was doing a conflation update. (AC-1288)
  • Fix escaping of options and orderby fields when using the amps protocol to connect. (AC-1292)
  • Continue to attempt to send heartbeats on every beat interval rather than simply waiting for read timeout to be exceeded. This may catch disconnects sooner in cases where the server didn't properly close the connection, such as a cloud host shutting down. (AC-1305)
  • Prevent non-delivery of messages to a MessageStream when re-using a query id for multiple queries in quick succession. (AC-1309)
  • Handle Overlapped I/O socket errors on Windows using Windows Framework as network corruption errors and disconnect when they occur. This reverts the change for AC-1245 due to the unreliability of the socket state after the error. (z18568) (AC-1336) (AC-1352)
  • Using a Command with Message.Commands.Unsubscribe will now correctly remove the subscription delivery router and ensure that the subscription will not be restarted by the SubscriptionManager after a reconnect event in an HAClient. (z18760) (AC-1349)

Version 5.3.3.4 (2024-01-29)

Fixes and Improvements:

  • Fix conditional compilation errors when building client from source on latest .Net platforms. (Z15416) (AC-1237)
  • Fix issue where the client disconnects when Windows mistakenly returns socket error 997 (i.e. SocketError.IOPending, Overlapped I/O operation is in progress) from a blocking read on the client's underlying socket. Normally this error is only expected with asynchronous I/O, which the client is not doing. The client will now treat this error (as well as SocketError.Interrupted) like a read timeout, maintaining the connection and retrying the read operation. (Z13517, Z16293) (AC-1245)
  • Fix issue where a value specified using the tcp_nodelay connection URI parameter wasn't taking effect. (AC-1247)
  • Allow setting a TLS server name indication (SNI) via the sni connection URI parameter. (Z16460) (AC-1235)
  • Allow setting a TCP connection timeout via the tcp_connecttimeout connection URI parameter. (Z16460) (AC-1267)

Version 5.3.3.3 (2021-12-28)

Fixes and Improvements:

  • 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)

Version 5.3.3.2 (2021-11-19)

Fixes and Improvements:

  • Fixed a regression introduced in 5.3.3.1 in client.ack(topic, bookmark) where an array copy would try to copy 1 too many bytes and could lead to an exception if the underlying buffer of the bookmark was the exact length of the bookmark, as would be the case if it came from message.getBookmarkRaw().copy(). (z13523) (AC-1142)

Version 5.3.3.1 (2021-10-28)

Fixes and Improvements:

  • 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)

  • Refactored TCPTransportImpl to allow custom transport implementations to opt out or provide their own implementation of DNS resolution during socket creation and connection. (Z13329, AC-1131)

Version 5.3.3.0 (2021-08-11)

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)

  • Client.setTransportFilter has been added and will set the provided transport filter on the Transport immediately or when the Transport is created rather than needing to set it on the Transport directly. (AC-657)

  • 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)

Fixes and Improvements:

  • Message copy functions now only copy the part of the buffer that contains data rather than copying the entire buffer. (AC-396, Z2320)

  • 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 in LoggedBookmarkStore where locking may have been insufficient to prevent a null pointer exception in cases where one thread was closing the store while another tried to use it. (AC-895)

  • Fix race condition in HAClient where one thread could send a command to the server between another thread's calls to connect and logon during a reconnect attempt. The extra command would force an attempt at implicit logon and a likely disconnect forcing another reconnect. (AC-1015)

  • Documented the return value for all publish and deltaPublish functions where it had been missing. (AC-1016)

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

  • Calls to HAClient.connectAndLogon will reset the ReconnectDelayStrategy before beginning an attempt to connect and logon. Previously, a client disconnected by the delay strategy reaching its maximum timeout value would be unable to connectAndLogon without an explicit call to reset on the delay strategy. (AC-1030) (z12123)

  • 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 BookmarkStore implementations to return copies of the most recent field. (z12476) (AC-1060)

  • Update BlockPublishStore to no longer check if a resize is greater than Int.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 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)

  • Fix possible deadlock in Client during reconnect when using convenience methods such as subscribe due to overlocking. (AC-1114)

Version 5.3.2.4 (2021-07-13)

Fixes and Improvements:

  • Fix issues that could cause the client to stop receiving messages or processing heartbeats:

    • When using compression, the client could loop forever when inflating messages if those messages were corrupted in transit. (AC-1097, Z12850)

    • The client could fail to properly detect disconnection (which would prevent the disconnect handler from running, and prevent the HAClient from reconnecting) if the underlying socket was forcibly reset by the peer or operating system. (AC-1099, Z12850)

  • Fix issue where TLS/SSL connections (the tcps transport in the AMPS connection string) could become corrupted when the connection is inactive for one second or longer. (AC-1101, Z12850)

  • Fix issue where queue acknowledgement batches were not properly formatting the set of bookmarks to acknowledge. The AMPS server correctly handled the format provided, however, this release provides acknowledgements in the expected format. (AC-1104)

  • This release introduces a Stream wrapper class for use in custom Transport implementations that use an SslStream. This wrapper works with the Transport to manage heartbeating and socket read timeouts without corrupting the state of the SslStream. (AC-1101, Z12850)

Version 5.3.2.3 (2021-04-13)

Fixes and Improvements:

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

  • Fix to support .Net Standard 2.0 for .NET Core builds. (This reverts the supported framework versions to the same versions supported in 5.3.0.0). (AC-1072, Z12242)

Version 5.3.2.2 (2021-03-30)

Fixes:

  • Fix issue where, if two or more bookmark replay subscriptions from the same client are at the same point in the transaction log, and the first subscription to receive a message for one of these subscriptions discards the message in the message handler (or while routing to other subscriptions is still in progress), that message could be considered a duplicate for the other subscriptions. (AC-1063, Z12242)

  • Fix issue where a bookmark range could be considered invalid if the range contains a timestamp with a decimal value. (AC-1065)

Version 5.3.2.1 (2021-02-12)

New features:

  • 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)
  • Makes class URIProperties public to enable URI query string parsing by custom transports without adding a referece to System.Web. (AC-1047)

Version 5.3.2.0 (2020-10-06)

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)

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)
  • A SOWRecoveryPointAdapter implementation of the RecoveryPointAdapter interface have been added. The behavior is to save every update into a SOW topic in the server using a separate client. (AC-756)
  • 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)
  • Added an optional flag to the constructor of the file-based bookmark store classes to tell them to include the file's last modification time in the most recent bookmark until new, usable bookmarks have been added. This is useful in the case where the bookmarks in the file may be older than the bookmarks in the current transaction log to prevent a subscription from starting from NOW behavior if none of the recovery bookmarks are present in the log. (z5314) (z9621) (AC-887)
  • 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)
  • Added getSequence and setSequence to 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)
  • The .NET Core version of the Client now supports using TCPS connections with SSL. (z11526) (AC-986)
  • LoggedBookmarkStore will now allow subid and bookmark lengths greater than 255 characters. The limit is now Int32.MaxValue. (AC-998)

Fixes and other changes:

  • Fix LoggedBookmarkStore to throw an exception if corruption is detected during recovery of a file and the corrupted record does not appear to be the final entry in the file. (z9263) (AC-874)
  • Fix calls to FailedWriteHandler to include the sequence number if one was provided on the persisted ack. (AC-884)
  • A MessageStream object that fails to auto ack a queue message will close in an error state. (AC-897)
  • Fix Client to not send persisted acks for bookmark subscriptions to the BookmarkStore if the subscription is not currently subscribed. Previously, the persisted acks could be delivered and cause missed messages if everything in the store for that subscription had been discarded, a subscription was closed while a second bookmark subscription was still active, and then the first subscription was resubscribed. (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)
  • Fix BookmarkStore classes to properly handle scenarios where messages are discarded out of order, the client fails over and begin to receive messages, then the client fails over again before it had received all of messages seen during the initial subscription. Previously, this could lead to an incorrect bookmark used a the most recent. (z10507) (AC-953)
  • Fix BookmarkStore classes to correctly use the last discarded bookmark when building a list of bookmarks for most recent and no persisted acks have been received. (AC-957)
  • Fix Client to return an empty MessageStream any time a Command will not return any messages or acks. Previously, commands such as a sow_delete that did not request a stats ack could hang if you attempted to iterate the returned MessageStream. (AC-964)
  • An exception during Client::execute can no longer cause incorrect messsage delivery if the same subId or command id is later re-used when successfully executing another command. (z11017) (AC-982) (AC-983)
  • The subId on Message objects that were copied in an asynchronous message handler can no longer get corrupted. (AC-999)

Version 5.3.0.1 (2020-02-14)

New features:

  • Added setCrc(Utilities.CRC32) to PublishStore to allow a custom implementation to be used. An application can also set this method to null to turn off CRC validation. This change is a performance enhancement to allow publishers that send large messages to use a CRC32 implementation that uses CPU-specific optimizations, or to bypass CRC validation entirely. (AC-947) (z10610)

Fixes and other changes:

  • Improved performance of the DefaultCRC32 used by PublishStore. (AC-947) (z10610)

Version 5.3.0.0 (2019-07-08)

New features:

  • Added Select and Expire to Message.Options. (AC-882)

Fixes and other changes:

  • LoggedBookmarkStore now correctly prunes the file when a message has been discarded since the last call to prune. (AC-738)
  • Fixed a deadlock condition during connectAndLogon when a client is disconnected before sending the initial heartbeat. (AC-885) (z9590)

C# version 5.2

Version 5.2.4.0 (2019-05-15)

Breaking changes:

  • The Client.flush function has been marked Obsolete. 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)
  • Removed a potential hang in HAClient that was caused by trying to flush ack messages during reconnect. (AC-690)
  • 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 process 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)
  • 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)
  • Removed potential hang in HAClient if an exception was thrown during logon and the background thread was attempting to flush queue acks. (AC-840)
  • Fixed BlockPublishStore to always restore _resizing to false and prevent a hang if there is an exception while attempting to grow. (z8769) (AC-853)
  • Client now properly flushes batched queue acks when disconnect is called. (AC-870)
  • Client now properly flushes batched queue acks on the ack timeout interval even if there are constant inbound messages. (AC-871)
  • LoggedBookmarkStore will now throw an exception during recovery if there is file corruption before the final entry. (z9263) (AC-874)
  • LoggedBookmarkStore.prune no longer can corrupt on subscription's last persisted bookmark with a value from another subscription. (z9263) (AC-876)
  • LoggedBookmarkStore.purge will throw a StoreException rather than a NullPointerException if the store was previously closed. (AC-877)
  • TransportFactory now allows you to register a transport from an external assembly. (AC-865)

New features:

  • Added support for building the AMPS C# client using .Net Core 2.2. Please note that SSL support is not currently supported on .Net Core. (AC-692, AC-821)

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).
  • A clear() method has been added to FIXBuilder and NVFIXBuilder classes to allow them to be reused for building multiple messages (z8000) (AC-805).
  • The Assembly properties and signing are now preserved in the NuGet package of the AMPS client (z8024) (AC-806).

Fixes and other changes:

  • The RingBookmarkStore class now uses an anonymous MemoryMappedFile to prevent collisions (z5775) (AC-786).

Version 5.2.2.0 (2018-04-23)

Breaking changes:

  • The ConnectionStateChangedEventArgs 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)
  • All methods in DefaultServerChooser are now declared virtual so they can be overridden in sub-classes. (AC-776)

Fixes and other changes:

  • 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 UserInfo fields used for logon are now URL-unescaped. (AC-774) (z7246)
  • The client version long form is now sent to the server during logon and returned from Client.getVersion(). (AC-775)
  • The client heartbeat timer wasn't properly restarting which could cause a client to be disconnected due to lack of heartbeat activity during a large query. (AC-919)

Version 5.2.1.2 (2017-12-29)

Fixes and other changes:

  • BlockPublishStore.store() now properly reclaims memory used and prevents the partial Message from being replayed. (AC-734)
  • 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 for messages that did not arrive from a queue. (AC-733, AC-737)
  • The Client.getVersionAsInt() function now treats any portion of a version that is larger than 99 as 99. (AC-730)
  • Added missing functions isRecordsReturnedNull() and isRecordsUpdatedNull() to the Message class. (Z5530) (AC-669)

Version 5.2.1.1 (2017-12-06)

Fixes and other changes:

  • A Client with a publish store that never publishes messages, but consumes and acks messages from an AMPS message queue previously could run out of memory. (AC-687) (Z5753)
  • 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)
  • 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-19)

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)

Version 5.2.0.2 (2017-03-10)

Fixes and other changes:

  • Fix an issue with Message.copy() where the _OrderBy and _MessageType fields wouldn't copy to the destination message. This was reported when performing a SOW and Subscribe command with an order-by clause on an HAClient because any client with a non-default subscription manager will make a copy of the command message before sending it, thereby causing the order-by to be lost. (Z4686) (AC-619)

Version 5.2.0.1 (2017-03-07)

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)

C# version 5.1

Version 5.1.0.0 (2017-01-26)

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:

  • 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)
  • Fix race condition that could put in place an incorrect MessageHandler for a subscription if MemorySubscriptionManager is doing a resubscribe while another thread is updating the same subscription with a replace, pause, or resume. (AC-559)
  • 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)
  • Fix possible deadlock between calling disconnect() on an HAClient while it is in the process of handling an reconnect. (AC-537)
  • Fix memory leak of MessageStream objects if Client.execute() throws an exception before completing. (AC-544)
  • Fix memory leak of MessageStream objects when calling Client.sowDelete version that returns a Message. (AC-592)
  • Fix LoggedBookmarkStore.prune to prevent message loss in cases where there are mutlitple reconnects. (AC-547) (AC-563) (AC-604)
  • Fix BlockPublishStore.flush to correctly throw a TimedOutException if it times out. (AC-555)

C# version 5.0

Version 5.0.1.1 (2016-06-23)

Fixes and other enhancements:

  • 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.
  • 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. (AC-459)
  • 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 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)
  • Allow Client.setHeartbeat() to be used before connecting. (AC-509)

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.

Compatibility note:

  • This release changes the output of the BookmarkField.ToString() method. Previously, that method produced human-readable output that described the bookmark rather than producing a bookmark in the format required by AMPS. This difference in format led to confusion and made BookmarkField more difficult to use.

Fixes and other enhancements:

  • Fix bug that could produce invalid bookmarks in the pruned store when calling the LoggedBookmarkStore prune() method. (Z3165, Z3268) (AC-439)

  • Change the output of BookmarkField.ToString(), which produced output that was not usable by AMPS.

Version 5.0.0.0 (2016-03-04)

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.
  • MessageStreams now support client side conflation. When enabled, client side conflation replaces unprocessed messages with the same SowKey in the queue underlying the message stream.
  • Store implementations now store ack types requested 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.Buffer interface now has functions to put a buffer given offset and length and get bytes 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)
  • MemorySubscriptionManager has been upgraded to handle proper sending of pause and resume subscriptions making sure that resume groups resume together.
  • Store classes now must determine and set the sequence number on Message objects that are saved. This makes sequencing easier.

Fixes and other changes:

  • Continue to wait for a processed ack when an InterruptedException is thrown until the timeout is exceeded. (Z1918)
  • Throw an AlreadyConnectedException when attempting to set a publish or bookmark store on a connected client 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)
  • Added an addAll function to DefaultServerChooser that adds an ICollection<String> to the list of URIs. (AC-361)
  • 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)
  • Added NoTopic to Message.Reasons.
  • Publish stores save expiration as a string instead of an int. (AC-382)
  • The version sent to AMPS in logon is now getVersion() + ":c#" 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)
  • SubscriptionManager interface was changed to take a Message in the subscribe function rather than individual field values. (AC-336)
  • Fixed Message._copyTo to properly copy the original Message when the original doesn't have an underlying buffer with the entire Message.
  • Removed the following deprecated fields from Message (AC-294):
    • MaxMessages
    • MessageId
    • SendEmpties
    • SendMatchingIds
    • SendOOF
  • Fixed ExponentialDelayStrategy to always return less than the set maximum regardless of jitter. (Z2190)
  • Added a maxDepth() option to MessageStream. This option sets the maximum number of messages the MessageStream will hold at a time. When the MessageStream is full, the receive thread will block. This prevents unbounded memory growth. However, the client will not process heartbeats or acknowledgement messages for any subscription when a MessageStream is full. (AC-351)
  • Changed how MessageStream waits for messages to arrive to reduce CPU load when no messages are arriving on the subscription. (AC-338)
  • 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)
  • Change all handling of sequence numbers to use ulong instead of long.
  • 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, such as processed acks, that are used internally in the Client were blocked from being returned. (AC-332)
  • Add support for custom heartbeat handling via the last-chance message handling facility. (Z2340)
  • Add support for a maximum retry time to FixedDelayStrategy (Z2030)
  • 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)
  • Client will now respond to authentication challenges with user id sent by the server in its response. (Z2993)

C# version 4.3

Version 4.3.1.5 (2015-10-09):

Fixes and other changes:

  • Fix MemorySubscriptionManager concurrency issues to prevent multiple threads accessing the internal Dictionary and also handle race conditions that can occur during resubscription after a reconnect. (Z2287)

Version 4.3.1.4 (2015-10-02):

Fixes and other changes:

  • Fix CompositeMessageParser to correctly parse messages larger than 2^24. (Z2181)

Version 4.3.1.3 (2015-09-30)

Fixes and other changes:

  • Fix MemorySubscriptionManager to create its own copy of the subId to prevent the manager from having multiple subscriptions keyed by the same object. (Z2266)
  • Fixed ExponentialDelayStrategy to always return less than the set maximum regardless of jitter. (Z2190)
  • 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)
  • Fixed Message._copyTo to properly copy the original Message when the original doesn't have an underlying buffer with the entire Message.
  • Fixed LongField to use a long instead of an int when converting to a numeric value.

Version 4.3.1.2 (2015-09-01)

Fixes and other changes:

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

Version 4.3.1.1 (2015-07-07)

Fixes and other changes:

  • Fix MessageStream to prevent 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 a ThreadInterruptedException is thrown. (Z1918)
  • Fix LoggedBookmarkStore prune() function to properly transition to the smaller, pruned file.

Version 4.3.1.0 (2015-06-22)

This version of the AMPS C# client introduces and changes functionality.

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. The client uses ExponentialDelayStrategy by default, which may change the timing of failover connections if the client cannot connect to a server on the first attempt.
  • 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)
  • Fixed MemorySubscriptionManager to replace existing subscriptions with updated versions so the latest will be the one that is resubscribed if the client is disconnected. (Z1646)
  • Added is___Null() methods on 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)
  • Added new MessageStream.timeout() method that allows a timeout to be specified for reading the next message from a stream. If no message arrives within the timeout, a null Message is returned, and the stream remains open.
  • Added Client.executeAsync() overload that takes an Action<Message>. (AC-302).
  • 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)
  • 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)
  • Add prune() function to LoggedBookmarkStore to reduce the file size to the minimum necessary to recreate the current state.
  • Message setters now return the current Message to allow setter calls to be easily chained together.

C# version 4.0

Version 4.0.0.4 (2015-05-07)

  • 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.0.2 (2015-02-25)

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

Version 4.0.0.1 (2015-01-30)

  • Fixed deadlock in HAClient when a logon failure occurs during connectAndLogon(). (Z1384)

Version 4.0.0.0 (2014-12-02)

This version of the AMPS C# 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 change:

  • 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. The 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.

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 (AMPS-280)
  • Removed 22-character limit from command, subscription, and query IDs (AC-222)
  • Refactored TCPTransport and TCPTransportImpl for easier creation of mock transports for unit testing. (AC-238)
  • 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. (AC-237)
  • Corrected parsing of failure reasons returned by AMPS in the Reason field. (AC-226)
  • Added bookmarkDeltaSubscribe method to Client. (AC-215)
  • Removed the erroneous SendEmpties option from Message.Options.
  • Improve performance of processing replayed messages after a disconnect and resubscribe. (AC-242, AC-243, AC-134)
  • 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. (AC-207)
  • Disallow subscriptions with the replace option when no subscription ID is passed, to help prevent programming errors with this option. (AC-153)
  • 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. (AC-106)
  • 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. (AC-182)
  • Renamed message type to protocol throughout the clients for consistency with AMPS 4.0 terminology.
  • Renamed setUnhandledMessageHandler to setLastChanceMessageHandler. (AC-197)
  • 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)
  • Added new TransportFilter interface for working with the raw bytes sent and received by the AMPS Client. (AC-269)

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"

Version 3.8.0.3 (2015-12-10)

  • Deliver messages that arrive after the stats ack when issuing a sow_and_subscribe or sow_and_delta_subscribe command. (Z1318)

Version 3.8.0.2 (2014-11-05)

  • After an unsubscribe(), prevent user message handler from being invoked, even when the server sends additional messages to the client. (Z1183)

Version 3.8.0.1 (2014-07-11)

  • 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 numbers returned from getServerVersion. This function will also work with shortened version strings, such as "3.8", which will return 3080000.

  • 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. (AC-200)

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

  • 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. (AC-195)

  • 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)

  • 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 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)

  • Options strings are now correctly generated from OptionsField when passing multiple options using an enumeration.

Version 3.8.0.0 (2014-03-10)

  • Change version number so that major/minor version matches server release. There are no AMPS C# client releases versioned 3.3 through 3.7.
  • Protect against unbounded store growth. Added setResizeHandler functions to the bookmark and publish store classes so a that callback can be put in place to detect when a store is growing too large and handle the problem.
  • Change encoding of Options field in SOAP messages to match the server.
  • Fix spurious corruption of outbound publishes when responding to a heartbeat message.
  • Fix message serialization to not serialize options if options is None for pre-3.2 AMPS compatibility
  • Add sowDeleteByKeys() method
  • Remove completed ack from sowDelete()
  • Add overloads for SOW delete functions that take a lambda expression as a message handler.
  • Added publishFlush() to client to ensure all previous publish messages are sent.
  • Added methods to the client to start and stop an AMPS timer.

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

Version 3.2.0.1 (2013-07-03)

  • Treat null data/topic as an empty string in publish and deltaPublish.
  • Change Message fields to return String.Empty when not set, instead of null.
  • Remove delay on HAClient initial connection.

Version 3.2.0.0 (2013-03-20)

  • Rewrote AMPS.Client.Xaml.Subscription to use a new AMPS-specific model class instead of DataTable.
  • 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 and BookmarkStore implementations complementing HAClient functionality.
  • Fixed hang when using spark with sow_delete and an XML message type.

Version 3.1.0.5 (2012-11-13)

  • Added new reason parameter to Authenticator.completed.

Version 3.1.0.4 (2012-11-09)

  • Fix spurious TimedOutException when using a single client from multiple threads.

Version 3.1.0.3 (2012-09-19)

  • Fix issue with null Authenticator passed to logon().
  • Add version number to README file.
  • Added NotEntitledException.

Version 3.1.0.2 (2012-08-30)

  • Fix ack parse and handling for sow_delete.

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)

  • Ignore empty lines when publishing from a file.
  • Unescape user name during log in so that names with spaces do not contain \%20.
  • 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.