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.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
SubscriptionManagernow has asetFailedResubscribeHandlerwhich takes an implementation of the new classFailedResubscribeHandler. (AC-1096) (z12909) - Added
setErrorOnPublishGapto theStoreinterface. If this is set, aStoreimplementation 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 usingsyncacknowledgement 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
getNameHashValuetoClientto return the client's hash id as aulongas opposed to the string returned fromgetNameHash. (AC-1169) - Added
TransportFilterModifiableinterface 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_idlereadtimeoutURI parameter to set read timeout between 1 and 1000ms. Also addedgetIdleRunnableto theTransportinterface. 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_preflightURI 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 theampsprotocol and AMPS server version 5.3.4.0 or higher. Extra headers may be set on the GET message usingaddHttpPreflightHeadermultiple times orsetHttpPreflightHeadersonce with the list of headers as strings. (AC-1284) - Removed unused exception classes
InvalidProtocolException,InvalidTransportException,TransportException, andPublishFilterException. (AC-1310)
Fixes and other changes:
MemoryPublishStorewill now correctly start with the correct initial size of 10,000 2KB blocks, and not immediately resize. (z6392) (AC-765)- Allow
CommandExceptionfromlogonso that logon failures such as invalid message type are correctly seen. (AC-1122) - Fix queue ack messages that aren't
cancelorexpireto 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 asDisconnectedException) was thrown during publish command execution. (AC-1154) - Fix issue in
LoggedBookmarkStore.purgewhere the bookmark store file would have its version number overwritten, corrupting the file. (AC-1161) - Changed publish store classes to throw a
StoreExceptionif 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 trailingZtime zone indicator on a timestamp value. The AMPS User Guide documents theZtime zone indicator as optional (Zis assumed). (Z15340) (AC-1218) - Fixed possible hang or missed acks when a disconnect occurred while sending
sow_deletecommands. (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
HAClientwith 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 throwAlreadyConnectedExceptionon subsequent calls made without first callingdisconnect(). (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
EPOCHin 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
Clientis using, aConnectionExceptionwill 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)
TimedOutExceptionon the client side will now send anunsubscribeto the server to prevent the timed out command from eventually succeeding and returning data the client is no longer expecting. (AC-1281)SOWRecoveryPointAdapterwill now throwStoreExceptionfrom its constructor in the case where thetrackedClientNamematches the name of theClientbeing 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
ConflatingRecoveryPointAdapterwith aDynamicRecoveryPointthat 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
MessageStreamwhen 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
CommandwithMessage.Commands.Unsubscribewill now correctly remove the subscription delivery router and ensure that the subscription will not be restarted by theSubscriptionManagerafter a reconnect event in anHAClient. (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 asSocketError.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_nodelayconnection URI parameter wasn't taking effect. (AC-1247) - Allow setting a TLS server name indication (SNI) via the
sniconnection URI parameter. (Z16460) (AC-1235) - Allow setting a TCP connection timeout via the
tcp_connecttimeoutconnection 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
MemoryBookmarkStorethat causes a malformed most recent bookmark to be returned during recovery when it's used with aSOWRecoveryPointAdapterthat 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 frommessage.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
TCPTransportImplto 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.publishFlushadds a new overload that accepts an ack type to request. This argument accepts an ack type ofprocessedor an ack type ofpersisted. When the argument is specified, the client will always send aflushcommand to the server, regardless of whether aStoreis present. If aStoreis 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
processedacknowledgement requests that AMPS acknowledge that theflushcommand has been received and processed. -
A
persistedacknowledgement requests that AMPS acknowledge that theflushcommand has been received and processed and that all previous messages have been persisted.
There are no changes in behavior to the existing version of the
Client.publishFlushmethod. (AC-1046) -
-
Client.setTransportFilterhas been added and will set the provided transport filter on theTransportimmediately or when theTransportis created rather than needing to set it on theTransportdirectly. (AC-657) -
The
ExceptionListenerset on aClientwill now also be set on itsTransportby default. TheTransportcan be updated with its ownExceptionListenerafter theClientis connected. (z11871) (AC-1011)
Fixes and Improvements:
-
Messagecopy 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
FailedWriteHandlerwhen there is no publish store in place on the Client. (z4702) (AC-627) -
Fix issue in
LoggedBookmarkStorewhere 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
HAClientwhere 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
publishanddeltaPublishfunctions where it had been missing. (AC-1016) -
Ids that are automatically generated by the
Clientare now prefixed with "auto" to prevent unintentional clashes with user-specified numeric ids. (AC-1027) -
Calls to
HAClient.connectAndLogonwill reset theReconnectDelayStrategybefore beginning an attempt to connect and logon. Previously, a client disconnected by the delay strategy reaching its maximum timeout value would be unable toconnectAndLogonwithout an explicit call toreseton the delay strategy. (AC-1030) (z12123) -
Fix
ClientandHAClientto setBookmarkStore,DisconnectHandler,ReconnectDelayStrategy, andSubscriptionManagerto default versions if a null is passed in to the set function. (z12237) (AC-1040) -
Fix
BookmarkStoreimplementations to return copies of the most recent field. (z12476) (AC-1060) -
Update
BlockPublishStoreto no longer check if a resize is greater thanInt.Max_Valueand rely on either thePublishStoreResizeHandler(or the system running out of memory) to manage the maximum store size. (z12668) (AC-1077) -
Fix
Client.publishFlush(0)andBlockPublishStore.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
MessageStreamcould be returned when a command is executed on a client that is disconnected and trying to reconnect. (z12590) (AC-1090) -
Fix
HAClientrace where its disconnect handler could reconnect a disconnected client afterclose()ordisconnect()is called. (AC-1092) -
Fix possible deadlock in
Clientduring reconnect when using convenience methods such assubscribedue 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
tcpstransport 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
Streamwrapper class for use in customTransportimplementations that use anSslStream. This wrapper works with theTransportto manage heartbeating and socket read timeouts without corrupting the state of theSslStream. (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=zliboption to the connection URI. (AC-1035) - Makes class
URIPropertiespublic 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
BookmarkStoreclasses to improve their performance. (AC-391) - The
startTimerandstopTimerfunctions onClientare marked as deprecated. Starting in AMPS server version 5.3.2.0 these commands are no longer available. (AC-969) MessageStreamwill now deliver all queued messages before throwing aDisconnectedExceptiononce a disconnect has been detected. (AC-985)
New features:
- The Client now has a
setGlobalCommandTypeMessageHandlerfunction that is used to put in place handlers for all messages of a specific command type, such asack. AMessageHandlerput 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.setThreadCreatedHandlerand newThreadCreatedHandlerinterface. 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
MemoryBookmarkStoreorLoggedBookmarkStorecan now be created with aRecoveryPointAdapter. The adapter can be implemented to save aRecoveryPointsomewhere for later recovery to guarantee no missed messages. (AC-527) - A
SOWRecoveryPointAdapterimplementation of theRecoveryPointAdapterinterface have been added. The behavior is to save every update into a SOW topic in the server using a separate client. (AC-756) - A
ConflatingRecoveryPointAdapterimplementation of theRecoveryPointAdapterinterface have been added. The adapter starts a thread that conflates updates before passing them to an underlyingRecoveryPointAdaptersuch as aSOWRecoveryPointAdapterto 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
NOWbehavior 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.getNameHashafter 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
getSequenceandsetSequencetoCommandclass. The sequence can be checked after a call toexecutefor commands such aspublish,delta_publish, andsow_deleteto 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)
LoggedBookmarkStorewill now allow subid and bookmark lengths greater than 255 characters. The limit is now Int32.MaxValue. (AC-998)
Fixes and other changes:
- Fix
LoggedBookmarkStoreto 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
FailedWriteHandlerto include the sequence number if one was provided on the persisted ack. (AC-884) - A
MessageStreamobject that fails to auto ack a queue message will close in an error state. (AC-897) - Fix
Clientto not send persisted acks for bookmark subscriptions to theBookmarkStoreif 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 toLoggedBookmarkStore.prune()could cause the concurrent logged bookmark entry (bentry) 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 toprune()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
BookmarkStoreclasses 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
BookmarkStoreclasses 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
Clientto return an emptyMessageStreamany time aCommandwill not return any messages or acks. Previously, commands such as asow_deletethat did not request astatsack could hang if you attempted to iterate the returnedMessageStream. (AC-964) - An exception during
Client::executecan 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
Messageobjects 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)toPublishStoreto allow a custom implementation to be used. An application can also set this method tonullto 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
DefaultCRC32used byPublishStore. (AC-947) (z10610)
Version 5.3.0.0 (2019-07-08)
New features:
- Added
SelectandExpiretoMessage.Options. (AC-882)
Fixes and other changes:
LoggedBookmarkStorenow correctly prunes the file when a message has been discarded since the last call toprune. (AC-738)- Fixed a deadlock condition during
connectAndLogonwhen 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.flushfunction has been markedObsolete. It had no functionality previously. The methodClient.publishFlushis provided to wait for persisted acks onpublishandsow_deletecommands if theClienthas aStoreor will wait for aflushcommand to be acknowledged asprocessedensuring 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
ackfor theMessage. (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 is0, 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
HAClientthat was caused by trying to flush ack messages during reconnect. (AC-690) MessageStreamobjects 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)
MessageStreamobjects produced by aClientwith 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 theMessageStreamwhich could lead to unprocessed messages being acked if a client process exited with messages still held in theMessageStream. It could also completely drain a message queue since messages were being acked immediately upon arrival. (AC-825)LoggedBookmarkStore.prunenow cleans up files that have only accumulated new persisted bookmarks. Previously, only a change in the last discarded bookmark would causepruneto modify the file. (z8434) (AC-831)LoggedBookmarkStore.prunewill now retry file delete and rename operations in case of slow file system updates. (z7614) (AC-836)- Removed potential hang in
HAClientif an exception was thrown during logon and the background thread was attempting to flush queue acks. (AC-840) - Fixed
BlockPublishStoreto always restore_resizingto false and prevent a hang if there is an exception while attempting to grow. (z8769) (AC-853) Clientnow properly flushes batched queue acks whendisconnectis called. (AC-870)Clientnow properly flushes batched queue acks on the ack timeout interval even if there are constant inbound messages. (AC-871)LoggedBookmarkStorewill now throw an exception during recovery if there is file corruption before the final entry. (z9263) (AC-874)LoggedBookmarkStore.pruneno longer can corrupt on subscription's last persisted bookmark with a value from another subscription. (z9263) (AC-876)LoggedBookmarkStore.purgewill throw aStoreExceptionrather than aNullPointerExceptionif the store was previously closed. (AC-877)TransportFactorynow 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.logonfunction can now be called with an options string, such as "ack_conflation=500ms" (AC-792). - The
HAClientclass now hassetLogonOptionsandgetLogonOptionsfunctions to set the options to be used forlogoneach time it's called (AC-792). - The
VersionInfoclass 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 toFIXBuilderandNVFIXBuilderclasses 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
RingBookmarkStoreclass now uses an anonymousMemoryMappedFileto prevent collisions (z5775) (AC-786).
Version 5.2.2.0 (2018-04-23)
Breaking changes:
- The
ConnectionStateChangedEventArgsclass has been expanded to include:LoggedOn,HeartbeatInitiated,PublishReplayed,Resubscribed, andShutdownstates.Shutdownindicates that theClienthas 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 theLoggedOnstate for aClientor theResubscribedstate for anHAClient. Note: enum value order and associated int values have also changed. (AC-457) (z3494, z6468)
New features:
- Added
Client.setDefaultMaxDepth,Client.getDefaultMaxDepth,MessageStream.getMaxDepth, andMessageStream.getDepthmethods to control the max depth on newMessageStreamobjects created by theClientand to monitor the depth on theMessageStream. (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.ackandMessage.ackmethods 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=truein the URI. (AC-755) - All methods in
DefaultServerChooserare now declared virtual so they can be overridden in sub-classes. (AC-776)
Fixes and other changes:
- Fix
Client.unsubscribeto properly throwDisconnectedExceptionif theClientis disconnected when calling the function. Previously, this could hang. (AC-760) (z6892) - Fix
Client.unsubscribeto properly remove allMessageHandlers in place for subscriptions. (AC-768) - It is no longer possible for a handler to be incorrectly replaced in the
Clientwhen doing apauseorresumeon an existing subscription. (AC-773) - The
UserInfofields 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 partialMessagefrom being replayed. (AC-734)- The
ack()methods onMessageandClientare now a no-op if there is no bookmark provided. Also, the_clientfield onMessageis 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()andisRecordsUpdatedNull()to theMessageclass. (Z5530) (AC-669)
Version 5.2.1.1 (2017-12-06)
Fixes and other changes:
- A
Clientwith 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
Storeon aClientthat is consuming from an AMPS Queue. Issues included incorrect unpersisted count, incorrect duplicate detection, hangs while trying toflushtheStore, large memory growth of theStore, and queue acks not being replayed from theStoreduring 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
LoggedBookmarkStorerecovery 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
LoggedBookmarkStoreprune 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
bookmarkDeltaSubscribefunction has been removed fromClientas the AMPS server does not support this operation. (AC-646) - Added
Client.setRetryOnDisconnectmethod 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:
Commandobject 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_OrderByand_MessageTypefields 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
BookmarkRingBufferto prevent possible corruption when aLoggedBookmarkStoreis 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):
SkipNProjectionGrouping
Fixes and other changes:
- Fix
OptionsFieldto 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
setResubscriptionTimeouttoMemorySubscriptionManagerclass 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
Clientfor heartbeat interval and read timeout. (Z3720) (AC-508) - Added new options for 5.1.0.0 and newer AMPS servers (AC-532) (AC-543):
ConflationConflationKeyFullyDurableRateMaxGap
- Added new function
purge(subId)to theBookmarkStoreinterface 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.connectAndLogonat the same time. (AC-449) - The
MemorySubscriptionManager.DefaultResubscriptionTimeouthas been changed to 0, or no timeout. (Z3372) (AC-460) - Updated
LoggedBookmarkStore.prunefunction 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
NotEntitledExceptionmessage between logon and other commands. (AC-511) - Fix
MemorySubscriptionManagerto 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
MessageHandlerfor a subscription ifMemorySubscriptionManageris 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
MessageStreamobjects ifClient.execute()throws an exception before completing. (AC-544) - Fix memory leak of
MessageStreamobjects when callingClient.sowDeleteversion that returns a Message. (AC-592) - Fix
LoggedBookmarkStore.pruneto prevent message loss in cases where there are mutlitple reconnects. (AC-547) (AC-563) (AC-604) - Fix
BlockPublishStore.flushto correctly throw aTimedOutExceptionif it times out. (AC-555)
C# version 5.0
Version 5.0.1.1 (2016-06-23)
Fixes and other enhancements:
- Fix bug in
Clientthat could cause aLoggedBookmarkStoreto have an incorrect value for most recent for AMPS servers version 4.0.0.0 and above. - Fix bug in
LoggedBookmarkStorewith 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
Clientwith aStorecould 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 madeBookmarkFieldmore 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.
MessageStreamsnow support client side conflation. When enabled, client side conflation replaces unprocessed messages with the sameSowKeyin the queue underlying the message stream.Storeimplementations now store ack types requested in addition to all previously saved values.PublishStoreandHybridPublishStorehave a new file format and will not work with store files from previous versions.Storeinterface now only contains onestore()method which accepts aMessage.Store.Bufferinterface now has functions to put a buffer given offset and length and get bytes directly into aFieldgiven a length.StoreReplayerinterface now only contains oneexecute()method which accepts aMessage.- Removed interfaces StoreEx, StoreWithKeys, and StoreReplayerWithKeys.
FailedWriteHandlerinterface now only contains oneexecute()method which accepts aMessageand areason.FailedWriteHandlerV4interface is the new name for the oldFailedWriteHandlerinterface. To continue using an existingFailedWriteHandlerwith no changes to the implementation, change the base class toFailedWriteHandlerV4.PublishStorewill 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)PublishStorehas a new functiontruncateOnClose(boolean), which, if set to true will cause an emptyPublishStoreto attempt to truncate its file toinitialSizeblocks when it is closed. (AC-405) (Z2255)- Added
Pause,Resume, andRate()toMessage.Optionsfor building Command options strings. (AC-406) MemorySubscriptionManagerhas been upgraded to handle proper sending of pause and resume subscriptions making sure that resume groups resume together.Storeclasses now must determine and set the sequence number onMessageobjects that are saved. This makes sequencing easier.
Fixes and other changes:
- Continue to wait for a processed ack when an
InterruptedExceptionis thrown until the timeout is exceeded. (Z1918) - Throw an
AlreadyConnectedExceptionwhen attempting to set a publish or bookmark store on a connected client as this is undefined behavior (AC-306) - Throw an
AlreadyConnectedExceptionorDisconnectedExceptionwhen attempting to call logon on anHAClientwhich does connect and logon as a single operation. (AC-306) - Added an
addAllfunction toDefaultServerChooserthat adds anICollection<String>to the list of URIs. (AC-361) - The
FailedWriteHandlerwill now be called in all cases of a persistedackbeing returned for a failure. If there is aPublishStorein place, the saved message will provide the data. Without aPublishStore, only the sequence number, if there is one, and the reason will be provided to the handler. (AC-339) - Added
NoTopictoMessage.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
addMessageHandlerandremoveMessageHandlerfunctions toClientso the non-blocking version of send can be used and results will still be handled. (AC-333) SubscriptionManagerinterface was changed to take aMessagein the subscribe function rather than individual field values. (AC-336)- Fixed
Message._copyToto properly copy the originalMessagewhen the original doesn't have an underlying buffer with the entireMessage. - Removed the following deprecated fields from Message (AC-294):
MaxMessagesMessageIdSendEmptiesSendMatchingIdsSendOOF
- Fixed
ExponentialDelayStrategyto always return less than the set maximum regardless of jitter. (Z2190) - Added a
maxDepth()option toMessageStream. This option sets the maximum number of messages theMessageStreamwill hold at a time. When theMessageStreamis 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 aMessageStreamis full. (AC-351) - Changed how
MessageStreamwaits for messages to arrive to reduce CPU load when no messages are arriving on the subscription. (AC-338) - Change all
Storeimplementations to set the initial sequence number to a large value based oncurrentTimeMillis. 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
ulonginstead oflong. - Changed
Client.executefunction to work better withpublishanddelta_publishcommands. If no acks are requested, an emptyMessageStreamis returned. If acks are requested, a command id is added before the message is sent. (AC-300) - Changed
Client.executeandClient.executeAsyncto return all acks that are set on the Command object to theMessageStreamofMessageHandler. 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
MemorySubscriptionManagerconcurrency issues to prevent multiple threads accessing the internalDictionaryand 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
CompositeMessageParserto correctly parse messages larger than 2^24. (Z2181)
Version 4.3.1.3 (2015-09-30)
Fixes and other changes:
- Fix
MemorySubscriptionManagerto create its own copy of thesubIdto prevent the manager from having multiple subscriptions keyed by the same object. (Z2266) - Fixed
ExponentialDelayStrategyto always return less than the set maximum regardless of jitter. (Z2190) - Change all
Storeimplementations to set the initial sequence number to a large value based oncurrentTimeMillis. This prevents backtracking in sequence numbers when simultaneous server and client failures occur and replication is in use. (Z1986) - Fixed
Message._copyToto properly copy the originalMessagewhen the original doesn't have an underlying buffer with the entireMessage. - Fixed
LongFieldto use alonginstead of anintwhen 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
Passwordfield to customAuthenticatorobjects. (Z2087)
Version 4.3.1.1 (2015-07-07)
Fixes and other changes:
- Fix
MessageStreamto prevent OOM when used withHAClient. TheHAClientwill no longer silently resubscribe aMessageStreamafter theMessageStreamends due to the client disconnecting. Instead, if the application wants to resume processing after failover, the application can reissue thesubscribecommand to get a newMessageStream. If your application has been usingHAClientwithMessageStream, review your usage to verify that your application expects theMessageStreamto end correctly. (Z1875) - Continue to wait for a processed ack until timeout is exceeded, even when
a
ThreadInterruptedExceptionis thrown. (Z1918) - Fix
LoggedBookmarkStoreprune()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
CompositeMessageBuilderandCompositeMessageParserclasses for working with composite message types. - Added the
ReconnectDelayStrategyinterface that allows an application to specify how long theHAClientwaits between reconnection attempts. The client provides two implementations,ExponentialDelayStrategyandFixedDelayStrategy. The client usesExponentialDelayStrategyby 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[])andCommandId.CommandId(byte[],int,int)topublic. (Z1643) - Removed
next()method fromServerChooserinterface. This method was not called by the AMPS client. Implementations that provide the method should see no difference in behavior. (AC-114) - Fixed
MemorySubscriptionManagerto 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 onMessagefor every header field. (AC-107) - Changed default encoding of
Fieldto UTF-8. (AC-304) - Greater consistency in calling user supplied exception listener instead of silently "swallowing up" internal Exceptions. (AC-301, Z1642, Z1495)
- Call
discardUpToon 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
SowKeyfield toCommandandMessageclasses for publishing to a SOW topic that is externally keyed. AddedStoreWithKeysinterface that takes aMessage. (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
LogonCorrelationDatato 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
TimestampandNoSowKeytoMessage.Optionsfor buildingCommandoptions 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, anullMessageis returned, and the stream remains open. - Added
Client.executeAsync()overload that takes anAction<Message>. (AC-302). - Fix
MemorySubscriptionManagerto not resubscribe with thereplaceoption. (Z1791, AC-354) - Fix
LoggedBookmarkStorerecovery 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
HAClientresubscribed after failover. (Z1762, Z1764) - Add
MemoryPublishStore.BLOCK_SIZEas a public static data member. This allows you to query the block size used for the class. (Z1587) - Bookmark stores now use
EPOCHor the most recently seen bookmark for each publisher forMOST_RECENTwhen 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 toLoggedBookmarkStoreto reduce the file size to the minimum necessary to recreate the current state. - Message setters now return the current
Messageto 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 ornullcommand ID or a sequence number of0. (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
HAClientwhen a logon failure occurs duringconnectAndLogon(). (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:
optionsfields are now strings, not Integers. Multiple options are specified by listing each option delimited with comma. To support this change,Message.Optionshas been changed from an enum to a class holding constant strings. - BREAKING CHANGE: the
PublishedDuplicateHandlerhas been renamed toFailedWriteHandler. ThepublishedDuplicatemethod has been renamed tofailedWriteand given an additional parameter,reason. This method is called whenever a loggedpublishorsow_deletefails 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
Commandclass to facilitate more flexible and easier execution of AMPS commands, along withexecuteandexecuteAsyncmethods on Client to execute aCommand. - Include the AMPS Command Reference in the client distribution to provide
a guide to using the new
Commandclass. - Add new
MessageStreamclass 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
TCPTransportandTCPTransportImplfor easier creation of mock transports for unit testing. (AC-238) - Added new
sowDeleteByKeysandsowDeleteByDatamethods for invokingsow_deletein AMPS withSOWKeysand with exemplar data, respectively. - Corrected parsing of
Passwordfield in XML protocol. (AC-237) - Corrected parsing of failure reasons returned by AMPS in the
Reasonfield. (AC-226) - Added
bookmarkDeltaSubscribemethod to Client. (AC-215) - Removed the erroneous
SendEmptiesoption fromMessage.Options. - Improve performance of processing replayed messages after a disconnect and resubscribe. (AC-242, AC-243, AC-134)
- Record
sow_deleteoperations in publish stores so that, during replay,sow_deleteandpublishmessages are replayed in the same order they were originally sent. (AC-207) - Disallow subscriptions with the
replaceoption 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, andOrderByfields toMessage. (AC-106) - Add new
ConnectionStateListenerinterface 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 newflushcommand on the AMPS server when available. (AC-182) - Renamed
message typetoprotocolthroughout the clients for consistency with AMPS 4.0 terminology. - Renamed
setUnhandledMessageHandlertosetLastChanceMessageHandler. (AC-197) - Cause all sowDelete methods to request a "stats" ack from the server.
- Added support for
orderby,bookmark, andtopNarguments tosow,sowAndSubscribe, andsowAndDeltaSubscribe. - Added optional
subIdparameter to all subscription methods on Client. - Fixed possible
ArrayIndexOutOfBoundsExceptioninBookmarkRingBufferthat could happen during a resize. (Z1272) - Added new
TransportFilterinterface 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_subscribeorsow_and_delta_subscribecommand. (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 HotfixTwo 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 return0. (Z884) -
Client has new function
getVersionAsIntto convert a version String to an int for comparison with numbers returned fromgetServerVersion. This function will also work with shortened version strings, such as"3.8", which will return3080000. -
Applications that use a file based
PublishStoreno 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
IOExceptionsinLoggedBookmarkStore.recover()to allow the store to recover up to the point where the error occurs in the file. -
Prevent a
NullPointerExceptionin 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
NullPointerExceptionfromLoggedBookmarkStorewhen trying to discard a bookmark during failover and a rare sequence of events happens with specific timing. (Z686) -
Prevent a
NullPointerExceptionfromMemoryBookmarkStorewhenisDiscardedis called during recovery and certain other rare conditions exist involving the discarded state of various bookmarks in the store. (Z795) -
No longer produce
ArrayIndexOutOfBoundsExceptionwhile 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
OptionsFieldwhen 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
setResizeHandlerfunctions 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
Optionsfield 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
Nonefor pre-3.2 AMPS compatibility - Add
sowDeleteByKeys()method - Remove
completedack fromsowDelete() - 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
publishanddeltaPublish. - Change
Messagefields to returnString.Emptywhen not set, instead ofnull. - Remove delay on
HAClientinitial connection.
Version 3.2.0.0 (2013-03-20)
- Rewrote
AMPS.Client.Xaml.Subscriptionto use a new AMPS-specific model class instead ofDataTable. - Added new
HAClientand associated classes for high availability. - Fixed bug whereby multiple concurrent invocations of
sow(),sowAndSubscribe(), etc. could result in spuriousTimedOutException. - Added new
PublishStoreandBookmarkStoreimplementations complementingHAClientfunctionality. - Fixed hang when using
sparkwithsow_deleteand anXMLmessage type.
Version 3.1.0.5 (2012-11-13)
- Added new
reasonparameter toAuthenticator.completed.
Version 3.1.0.4 (2012-11-09)
- Fix spurious
TimedOutExceptionwhen using a single client from multiple threads.
Version 3.1.0.3 (2012-09-19)
- Fix issue with null
Authenticatorpassed tologon(). - Add version number to README file.
- Added
NotEntitledException.
Version 3.1.0.2 (2012-08-30)
- Fix
ackparse and handling forsow_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.