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 (2025-08-04)
Breaking changes:
Client::setDisconnectHandlerhas been marked as deprecated. Automatic failover should be handled using anHAClient. Monitoring the connection state should be done with aConnectionStateListener. This change means that the client now enforces the long-standing best practice that applications should not replace the disconnect handler and should use the connection state listener to monitor connections. (AC-1276)- Calling
setDisconnectHandleron anHAClientwill throw aUsageExceptionas 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 and should use the connection state listener to monitor connections. (AC-1276)
New features:
- The new
bookmark_not_foundoption available in AMPS server 5.3.5.0 and above is now supported in theMessage::Optionsclass. (AC-1338)
Fixes and other changes:
- Passing
AMPS_DEFAULT_TOP_NtoCommand::setTopNwill now correctly unset any topN value and not send a very large number. (z13291) (AC-1129) - A newly constructed
MemoryPublishStorewill now always start sequencing at a manufactured value rather than a value based on what the AMPS server acknowledges during logon. This prevents incorrectly treating messages as duplicates in the case where a client has previously published more messages than the AMPS server can acknowledge during logon. (AC-1358) BookmarkStore::getMostRecentnow always returns aFieldwith a new buffer, soField::clearneeds to be called on the returnedFieldto free memory. This prevents any race conditions where the buffer could change. (AC-1363)- A timeout set on calls to
sowDelete,sowDeleteByKeys, orsowDeleteByDatafunctions that return aMessagenow 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
connecton aClientfollowing an exception from callinglogon. (AC-1376)
Version 5.3.4.6 (2025-06-03)
Fixes and other changes:
- Changed tcps code to use poll instead of select to avoid
FD_SETSIZElimit on fd. (z19441) (AC-1373) - A
SOWRecoveryPointAdaptercreated 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 aBookmarkStore. (z18948) (AC-1355)
Version 5.3.4.5 (2025-01-15)
New features:
- 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)
Fixes and other changes:
- When executing a
Commandforunsubscribe, the client will now correctly remove any message handlers for the subscription and update theSubscriptionManagerto not restart the subscription. (z18760) (AC-1349)
Version 5.3.4.4 (2024-12-18)
Fixes and other changes:
- Changed an old macro
closesockettoAMPS_CLOSESOCKETto avoid collision with other packages. (z18294) (AC-1319) - Updated HAClient reconnect logic to ensure that a disconnect immediately after successful logon completion can't be missed and leave a client in a disconnected state. Also, added extra protection to keep only a single thread handling reconnect. (AC-1327)
- Allow
DisconnectedExceptionto be thrown byexecutefor publish and delta_publish commands. (AC-1328) - Fixed logic for functions that send a command and don't return until after
a processed ack has returned from the server to guarantee that they don't
report a
DisconnectedExceptionif the disconnect happens before the command has been sent. This can result in seeing aSubidInUseExceptionif the same command is tried again after theDisconnectedException. (z18574) (AC-1329) - Fixed logic for functions that return
MessageStreamobjects so they aren't closed if the disconnect occurs before the command is sent. (AC-1331) - Fixed logic for commands waiting for a processed ack from the server to
ensure that a disconnect only results in
DisconnectedExceptionand not aTimedOutException. (AC-1337) - The
ampsprotocol parser now correctly parses and serializes headers containing characters that must be escaped in JSON. (AC-1342) SOWRecoveryPointAdapterproperly obeys theupdateFailureThrows_flag to throw exceptions in all cases where there is one. (z18648) (AC-1343)BookmarkStoreImplimplementations will no longer allow an invalid bookmark used when placing a bookmark subscription to be saved in the store or used when creating the most recent bookmark. Previously, this could lead to always getting anInvalidBookmarkExceptionor in some cases, a core dump while building the most recent bookmark. (z18574) (AC-1345)
Version 5.3.4.3 (2024-08-27)
Fixes and other changes:
- Further work ensuring all client receive threads are properly joined or detached, fixing some code paths that were missed in AC-1300. Other cleanup related to valgrind warnings of memory still accessible at application shutdown. (z17180) (AC-1313)
- Don't request the completed ack automatically for
sow_and_subscribeorsow_and_delta_subscribecommands. (z18075) (AC-1314) - Always use synchronous send with processed ack when executing
Commandfor commands that return data. (z18075) (AC-1315)
Version 5.3.4.2 (2024-07-15)
Fixes and other changes:
- Ensure that all client receive threads are properly joined or detached after a disconnect to prevent memory growth. (z17180) (AC-1300)
- All subscribe and sow commands now send an
unsubscribeif they timeout waiting for a processed ack. This avoids having results sent to the client later, when the command completes. (AC-1281) - A
UsageExceptionwill be thrown from aSOWRecoverPointAdapterif the client passed as the adapter client has the same name as the client it's tracking. (AC-1285) - 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)
- Fix
MessageStreamtimeout behavior to match the set timeout rather than be 1 second. (z17169) (AC-1296) - Correctly handle timeouts on tcps socket reads to run idle actions like sending batched queue acks and checking for heartbeats. (z17218) (AC-1303)
- 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)
- The per thread
Messageused for messages going into aStoreis now cleaned up as each thread exits, rather than all at exit. (AC-1306) - Ensure that tcps clients handle send failures caused by push back on the socket and properly retry. (AC-1307)
Version 5.3.4.1 (2023-10-09)
Fixes and other changes:
- Fix
sowAndDeltaSubscribeconvenience function to not send the command twice. (AC-1259) (z16250) - Fix a memory leak of an
struct addrinfowhen trying to bind the client connection to local address fails. (AC-1260) - 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)
Version 5.3.4.0 (2023-09-12)
New features:
- AMPS C++ Client now defaults to enabling tcp_keepalive on connections to
the AMPS server, consistent with other client languages. Previous behavior
can be obtained by adding
tcp_keepalive=falseto the connect string options. (AC-1256) - AMPS C++ Client now supports MacOS on arm64 and x86_64. (AC-1200)
- AMPS C++ Client now supports Linux on arm64.
- The distributions no longer include prebuilt libraries or samples. (AC-1200)
- 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 set functions to
Commandclass that takeconst char*, size_tas analogs of existing functions that takestd::string. (AC-1209) (z14995) - Allow setting a TLS server name indication (SNI) via a connection parameter. (AC-1235)
- Added
getNameHashValuetoClientto return the client's hash id as auint64_tas opposed to the string returned fromgetNameHash. (AC-1169) - Moved header files to
include/amps. Symbolic links remain in the include directory to avoid disruption of existing projects. (AC-1243) (z15847) - Added CMakeLists.txt that can build/install the library. (AC-1242) (z15847)
Fixes and other changes:
- Ack timeout can't be set to 0 if ack batch size > 1. (AC-1206)
- Fork handling was added to prevent a child process from starting with a mutex already locked. (AC-1225)
- Fixed a deadlock in tcps involving 3 threads that could occur when one thread is trying to close the connection during a reconnect event in the receive thread. (AC-1238)
- Cleaned up some compiler warnings using c++14, c++17, and c++20 as the chosen standard. (AC-1239)
- Fixed issue with connecting to a server on loopback when there is no outside network connection such as when in airplane mode. (AC-1249)
- Prevent receive thread from possibly running beyond the lifetime of its Client, possibly causing segv or unexpected behaviors. (AC-1250)
Version 5.3.3.4 (2023-05-23)
Fixes and other changes:
- Client no longer tries to send an
unsubscribecommand as part of disconnect. (AC-1199) - Prevent possible crash during disconnect handling where a race condition
could cause a NULL pointer to be sent to a handler instead of a pointer
to the
Client. (AC-1211) - Change field escaping to include command id and query id but not the correlation id which must be base64 characters. (AC-1215)
- Correct
AMPS::Field::isTimestampto not require a 'Z' as the final character. (AC-1218) - Remove deprecated tag from
AMPS::BookmarkStore::discard(subid, bookmarkSeq)and replace it with a recommendation to use theMessageversion for better performance when you have the option. (AC-1219) - Optimize logon and flush commands to not use Nagle to avoid a delay in send. (AC-1231)
- Fix
AMPS::BookmarkRange::replaceStartwhen replacing the start with a smaller bookmark than the previous start to correctly move the end and not end up with an invalid bookmark. (AC-1233)
Version 5.3.3.3 (2023-01-11)
Fixes and other changes:
- Client can now be built as a DLL with all functions exported on Windows by defining AMPS_SHARED before building. (AC-1204)
- Removed all calls to
pthread_yieldand replaced them with wait/signal pairs. (AC-1208)
Version 5.3.3.2 (2022-07-18)
Fixes and other changes:
- Break up sleeps from
ReconnectDelayStrategyinto 1s or smaller chunks to maintain responsiveness if signals are caught elsewhere. (z13237) (AC-1125) - Ensure that message handlers related to commands in a publish store are cleaned up if the command fails to send. (AC-1139)
- Improved handling and clarity of SSL errors. (AC-1175)
- Eliminate a possible endless loop during
MemorySubscriptionManagerresubscribe using no timeout. (AC-1189) - Fix compilation warnings related to WSAPROTOCOL_INFOA and calls to the select function using Linux-style first argument. (AC-1194)
Version 5.3.3.1 (2021-10-12)
Fixes and other changes:
- Fix compilation warnings on 64bit Windows related to formatting
size_tusing%lxand forcing conversion tobool. (z13341) (AC-1133) - Fix exception translation from server reason strings for reasons starting with "n", such as "not entitled" and "not supported". (AC-1134)
- Fix issue in bookmark stores where they could incorrectly return EPOCH as the most recent bookmark in rare cases where the last discarded bookmark and the last persisted bookmark share the same publisher id. (AC-1198)
Version 5.3.3.0 (2021-07-20)
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::publishFlushnow takes an optional argument for the ack type to request. A processed ack matches previous behavior. A persisted ack is a new feature that will ensure all previously published messages are safely persisted by the server. (AC-1046)
Fixes and other changes:
- A rare double-free could occur when a client's background thread was canceled after it had already begun to free resoures for exit. (AC-1081)
Version 5.3.2.1 (2021-03-15)
New features:
- The Client's name hash used by the server is now available after logon
with the
getNameHash()member function. (AC-905)
Fixes and other changes:
- Catch exceptions in
FailedWriteHandleror global command type message handlers and report them to theExceptionListenerif set. Previously, an exception in one of these handlers could shutdown the background receive thread and cause the client to not receive any more messages from the server. (AC-962) - Mask SIGPIPE on Linux to prevent crashes in clients using TLS/SSL. (AC-996)
- Fix
BookmarkStoreimplementations to honor persisted acks when resubscribing with a bookmark range. (AC-997) - Fix nested macros so they compile with clang5. (AC-1003) (z11808)
- Fix race conditions in TCPS implementation that could lead to deadlocks or crashes when attempting to reconnect. (AC-1005) (AC-1025)
- Added
-wextraflag to C code compilation and removed as many warnings as possible without breaking older compilers (unused parameter warnings remain unfixed). (AC-1014) - 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) - Prevent a race condition while accessing the
ReconnectDelayStrategyinHAClient. (AC-1017) - Unregister the
preDisconnectHandlerof the C++ client with the C client when destroying theClient. (AC-1023) - Ids that are automatically generated by the
Clientare now prefixed with "auto" to prevent unintentional clashes with user-specified, numeric ids. (AC-1027) - The URI option
bindis now error-checked when applied to tcp sockets. It is a synonym forpathon unix domain sockets. (AC-1029) (AC-1055) - 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) - When
unsubscribeis called, the associatedMessageHandlerwill be released within 1 second rather than the next time a message arrives from the server. (AC-1033) (z12228) - Improved hash function is now used in
MessageRouterto prevent possible collisions on the hash values of subscription ids. (AC-1034) (z12123) - Prevent hang in SSL/TLS clients when using a server with OpenSSL 1.1.1i or newer. (AC-1043)
- Don't lock the
Clientwhen getting members that shouldn't change while connected:BookmarkStore,PublishStore,SubscriptionManager,URI, andFailedWriteHandler. (AC-1053) (z12446)
Version 5.3.2.0 (2020-09-04)
Breaking changes:
- The
startTimerandstopTimerfunctions onClientare marked as deprecated. Starting in AMPS server version 5.3.2.0 these commands are no longer available. (AC-969)
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 if it is also handled elsewhere. (z3407) (AC-450) (AC-565) (AC-658) (AC-675) - Added
amps_client_set_thread_creeated_callbackthe C library andsetThreadCreatedCallbackto the C++Client. This will cause the provided function to be invoked every time a new thread is created by the AMPS client library in reposnse to a successful connection. The calling thread is is the new thread and its handle is provided to the callback. (z9855) (z9764) (AC-516) (AC-907) - A
MemoryBookmarkStorecan 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
setAckTypetoCommandclass that will clear the current ack type and use the new type, includingMessage::AckType::None. (AC-886) - 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 getting
NOWbehavior if no bookmarks are found. (z5314) (z9621) (AC-887) - Added
getQueryIdandsetQueryIdtoCommandclass. (AC-927) - Added
getSequenceandsetSequencetoCommandclass. The sequence can be checked after a call toexecutefor commands such aspublish,delta_publish, andsow_deleteto get the sequence numer that was assigned by the publish store if one was present. (z11000) (AC-954) - 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)
Fixes and other changes:
- Fix
LoggedBookmarkStoreto throw an exception if corruption is detected during recovery a file and it does not appear to be the final entry in the file. This is done on a best effort basis using the constantsAMPS_MAX_BOOKMARK_LENandAMPS_MAX_SUBID_LENwhich are defined ininclude\Field.hpp. (z9263) (AC-874) - Fix calls to
FailedWriteHandlerto include the sequence number if one was provided on the persisted ack. (AC-884) - Fix Client to not send persisted acks for bookmark subscriptions to the
BookmarkStoreif the subscription is not currently subscribed. Previously, the persisted acks could be delivered and cause missed messages if everything in the store had been dicarded. (z10045) (AC-912) - Fix
Clientto return an emptyMessageStreamany time aCommandwill not return any messages or acks. Previously, commands such assow_deletethat did not request astatsack could hang if you attempted to iterate the returnedMessageStream. (AC-964) - Destroying a
MessageStreamthat is only going to receiveackmessages before they have all arrived can no longer lead to a seg fault. (AC-975) - Fix URI parser to handle percent-escape characters in compliance with RFC 3986 and 1738. (z11551) (AC-987)
- An exception during
Client::executecan no longer cause a seg fault when the same subId or command id is later re-used when successfully executing another command. (z11017) (AC-982) (AC-983)
Version 5.3.0.5 (2020-09-03)
Fixes and other changes:
- Fix issue where an HAClient using a tcps connection could get disconnected and not automatically reconnect. (z11623) (AC-989)
Version 5.3.0.4 (2020-04-30)
Fixes and other changes:
- Fix issue where acks that were not requested by the application could be
delivered to the
lastChanceMessageHandler, if one is set. The fix for AC-946 in 5.3.0.3, to route more types of ack messages to the handler, exposed this issue. (z11045) (AC-956)
Version 5.3.0.3 (2020-04-20)
Fixes and other changes:
- Removed all warnings found using clang-9, g++ 9.2, and -std= flags: c++11, c++14, c++17, and c++2a. (z01836) (z10987) (AC-928) (AC-952)
sow_and_delta_subscribewill now properly throw aTimeoutExceptionif theprocessedack is not returned in time. (AC-934)- Added
Client::MOST_RECENT(),Client::NOW(), andClient::EPOCH()to align C++ client naming more closely with the other languages. This does not replace the previous constant definitions. (AC-936) - All ack types not handled elsewhere will now properly reach the last
chance handler, if a last chance handler is set. Previously, only
processedandpersistedacks were being delivered to the last chance handler. (AC-946) - Fixed a possible use after free error that could occur during destruction
of a
Clientthat had returned at least one emptyMessageStreamfrom a call toexecute. (AC-951)
Version 5.3.0.2 (2019-11-05)
Fixes and other changes:
MessageStreamImpldestruction is now deferred to the receive thread to prevent a race condition between its destruction and its message handler being called. This could result in a situation where no further messages would be processed for the connection. (AC-918) (z10063)FixedReconnectDelayStrategyandExponentialReconnectDelayStrategyno longer reset the timer used to check for exceeding the maximum retry time when a new URI is tried. The timer will only restart when the first attempt is made after a successful connection (or construction of the delay strategy). (AC-771) (z7165) (z9674) (z9820)- A
MessageStreamobject that fails to auto ack a queue message will close in an error state. (AC-897) - Disconnecting a client will no longer throw an exception if batched queue acks fail to flush. (AC-920)
- Acks for queue messages that were saved in an ack batch will not be lost when a client is forced to reconnect. (AC-921)
Version 5.3.0.1 (2019-08-06)
Fixes and other changes:
- A socket leak under some reconnect scenarios in the underlying C client has been corrected. (z9708, z9736, z9741) (AC-898)
Version 5.3.0.0 (2019-07-08)
Breaking changes:
- Support for AMPS server versions before 4.0.0.0 has been removed from the
BookmarkStoreclasses to improve their performance. (AC-391)
New features:
- The C library can now be built as a shared object by defining
SHARED=1when runningmake. (AC-266) (z1166) (z5063) - Added
ExpireandSelecttoMessage::Options. (AC-882)
C++ version 5.2
Version 5.2.4.0 (2019-05-15)
Breaking changes:
- The default batch size for all sow queries has been changed to 10. (AC-700)
- The
BlockPublishStoreimplementation which underlies all publish stores has been changed to reduce the time required to resize. The file format has also changed, but old format files should be recovered correctly and rewritten by the new implementation. The rewritten files will no longer work with earlier client versions. (AC-817)
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) - A subscription that throws an exception when placed will now be removed from
the
SubscriptionManagerif one is present. (z5943) (AC-709) 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 processs 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)- Added
amps_ssl_set_verifyandamps_ssl_load_verify_locationsfunctions to enable certificate verification. (AC-839) - Removed potential hang in
HAClientif an exception was thrown during logon and the background thread was attempting to flush queue acks. (AC-840) - Fixed possible hang or missed acks when a disconnect occurred while sending
sow_deletecommands. (z8567) (AC-841) - Fixed incorrect parsing of
ampsprotocol messages containing a topic with a trailing / character. (z8648) (AC-843) - Fixed
BlockPublishStoreto always restore_resizingto false and prevent a hang if there is an exception while attempting to grow. (z8769) (AC-853)
Version 5.2.3.0 (2018-09-12)
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). - OpenSSL version 1.1.0 and higher can now be detected and used for tcps connections. (AC-800)
- Added
Client::setTransportFilterFunction()to provide a cross-transport way of adding a filter function. (AC-803)
Fixes and other changes:
- Error messages from a failure in
getaddrinfo()are now properly thrown by theClient(z7935) (AC-801)
Version 5.2.2.2 (2018-07-06)
Fixes and other changes:
- Fix issue with gcc 5.2 and address sanitizer where a cast from
Client&toHAClient&during disconnect handling would cause address sanitizer to report an error. More recent versions of gcc were not affected. (AC-788) (z7645) - Fix race condition with functions returning
MessageStreamwhere the subscribe family of calls could potentially not send the subscribe command to the server during a reconnect, so theMessageStreamwould always be empty. (AC-787) (z7622)
Version 5.2.2.1 (2018-06-12)
Fixes and other changes:
- Fix
Client::unsubscribe(id_)to properly throwDisconnectedExceptionif theClientis disconnected when calling the function. Previously, this could hang. (AC-772) - Fix
Clientto only addMessageHandlers for new identifiers (command, subscription, or query). (AC-773) - Fix compilation errors when using Microsoft Visual Studio 2010. This compiler version has not been covered by Microsoft mainstream support since 2015, and will not be supported after this release. (AC-779) (z6468)
Version 5.2.2.0 (2018-02-03)
Breaking changes:
- The
ConnectionStateListenerclass 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)
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) - Fix a possible deadlock in
HAClientthat could occur iflogonfails while trying toconnectAndLogon. (AC-769) (z7057) (z7103)
Version 5.2.1.6 (2018-01-11)
Fixes and other changes:
- Fixed memory leak when command execution results in an exception. (AC-715)
- Fixed race condition which could result in a deadlock during disconnect handling. (AC-750)
Version 5.2.1.5 (2017-12-29)
Fixes and other changes:
- The
HAClientdisconnect handling could incorrectly stop retrying to connect when failing to connect multiple times. (Z6468) (AC-749)
Version 5.2.1.4 (2017-12-26)
Fixes and other changes:
BlockPublishStore.store()now properly reclaims memory used and prevents the partialMessagefrom being replayed. (AC-734)- The
Client::convertVersionToNumber()function, used byClient::getServerVersion(), now treats any portion of a version that is larger than 99 as 99. (AC-730) - Fix race condition in the
MessageRouterclass that could cause improper message routing or even a crash. (Z6536) (AC-748)
Version 5.2.1.3 (2017-12-15)
Fixes and other changes:
-
Message queue cancel acks are now properly stored with the cancel option in all store classes, and will not be replayed during a reconnect event to prevent an incorrect cancel of a message. (AC-732)
-
Messages that do not contain a bookmark will no longer create an invalid sow_delete ack message if the
ack()method is called. (AC-733) -
Clients that had called
setAckTimeout()could hang and consume 100% cpu if the server connection was lost. (Z6472) (AC-741)
Version 5.2.1.2 (2017-11-17)
Fixes and other changes:
- An embedded NULL in an amps protocol header field no longer causes the client to disconnect. (AC-694)
- 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, and large memory growth of theStore. (AC-707) (AC-708) (AC-711) (AC-712) - Fixed calls to
sowDelete*functions to remove theMessageHandlerif a timeout occurs. (AC-717) - Fixed
MemorySubscriptionManagerto prevent subscriptions from being deleted while they are being resubscribed. (AC-717)
Version 5.2.1.1 (2017-09-25)
Fixes and other changes:
- Improved performance of recovery of the file-based bookmark store classes:
MMapBookmarkStoreandLoggedBookmarkStore. (AC-683) (Z5652) - Improved
prunefunction forMMapBookmarkStoreandLoggedBookmarkStoreto only prune the file when the prune will change the size of the file. (AC-684) (Z5652)
Version 5.2.1.0 (2017-05-09)
New features:
- The
bookmark_delta_subscribefunction 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. (AC-635) - Added
getmethods toBookmarkStoreandStorewhich return a pointer to the underlying implementation. (AC-644) (Z4966)
Fixes and other changes:
- Fix build warnings and errors on Windows with older compilers. (AC-641) (Z4888)
- Fix
MMapBookmarkStore.prune()to start with the default file size rather than the size of the current store file. (AC-642) (Z4909) - Fix recovery of file-based bookmark stores to have a most recent of EPOCH when there were messages logged but no messages discarded. (AC-643)
Commandobject reuse will no longer cause unrequested acks to be delivered to the message handler. (AC-645)
Version 5.2.0.1 (2017-04-26)
Fixes and other changes:
- Fix
MMapBookmarkStore::pruneto create the temp file at the default initial size and grow as needed rather than starting at the same size as the current file. (AC-642)
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
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
getConnectionInfofunction toClientandHAClientto provide the same inteface found on clients in other languages. (AC-564) - 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
PublishStoreso that messages larger than 2048 * _blocksPerRealloc no longer can cause a crash. (AC-512) - Fix compilation warning on Windows. (AC-475)
- Fix protocol error using non-numeric SOW keys. (AC-515)
- Optimize message delivery when messages are arriving for the same subscription id. (AC-521)
- Removed assert in
CompositeMessageBuilder. (Z4074) (AC-531) - Fixed
PublishStoreto avoid the possibility of possible corruption during a resize while multiple threads are publishing with the same client and the client is forced to reconnect. (AC-534) - Fixed
Clientto prevent simultaneous message processing in a rapid disconnect/connect scenario that could lead to message corruption. (AC-535) - Fix compilation warnings on Linux when -Wconversion is used and added the flag to the values used in GNUMakefiles. (Z4213) (AC-551)
- Fix threading issues when using tcps transport that could lead to hangs or incorrect data. (AC-558)
- 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
FixedDelayStrategyso that a maximum of 0 always means retry indefinitely. (AC-561)
C++ version 5.0
Version 5.0.1.2 (2016-08-22)
Fixes and other changes:
- Fix issue where an ack message from AMPS would be delivered to the last chance message handler when an application acknowledges that a message from a queue has been processed. (Z3513) (AC-472)
- Fix bug where a Client with a Publish Store could have its publish messages seen as duplicates by the server if the client was also acking messages from a queue. (Z3609) (AC-490)
- Fix bug where sys/time.h was being included inside the AMPS namespace, hiding it from the global namespace. (Z3735) (AC-501)
Version 5.0.1.1 (2016-06-13)
Fixes and other changes:
- Fix bug in Client that could cause a
LoggedBookmarkStoreor `MMapBookmarkStore to have an incorrect value for most recent for AMPS servers version 4.0.0.0 and above. (AC-447) - Fix
HAClientto disconnect and retry connecting when thereportSuccessmethod of aServerChooserthrows an exception. (Z3256)
Version 5.0.1.0 (2016-05-24)
New features:
-
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.
SSL support uses dynamic shared object loading. If you are building on a Linux system, you will need to add
-ldl(or equivalent) to the arguments passed to the linker.
Fixes and other changes:
- Fix
MessageRouterand handler dispatch to avoid making unnecessary copies of a message handler. For handler objects that used an overloaded operator(), this could cause many objects to be created and could result in messages for a single subscription being routed to different copies of the handler. (Z3185) - Fix bug in
LoggedBookmarkStore.pruneandMMapBookmarkStore.prunethat could result in invalid bookmarks or invalid entries in the store. (Z3165, Z3268) (AC-439)
Version 5.0.0.1 (2016-03-25)
- Fix the default build on Visual Studio to use the same multithreaded and
DLL runtime (
/MDor/MDdfor release or debug builds, respectively) as had been used in previous versions of the AMPS C++ Client. (Z3082) - Client properly processes connection options (for example,
tcp_nodelay), fixing a bug introduced in 5.0.0.0 that would cause the client to throw an exception in some cases when connection options were present. (Z3119) - Client will now respond to authentication challenges with user id sent by the server in its response. (Z2993)
- BookmarkStores will now return a list of bookmarks as the most recent when:
- The original subscription was for NOW,
- Some bookmarks have been discarded, and
- No persisted ack has yet been received from the server. (Z3106)
Version 5.0.0.0 (2016-02-25)
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.
-
Message::Optionsis now string-based only. To set options on a Command or Message, use + -- for example:command.setOptions(Message::Options::OOF() + Message::Options::NoEmpties()); -
Message::Optionsnow includesTopN(int),Cancel(), andMaxBacklog(int). -
Store implementations now store the ack type in addition to all previously saved values.
PublishStoreandHybridPublishStorehave a new file format and will not work with store files from previous versions. -
Store interface now only contains one
store()method, which accepts aMessage. -
Storeinterface now returns the message's sequence number from thestore()function. The Client no longer tracks the sequence number. -
StoreReplayerinterface now only contains one execute() method which accepts aMessage. -
FailedWriteHandlerinterface now only contains oneexecute()method which accepts aMessageand areason. -
PublishStorewill recover up to the first corrupt message, 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 empty PublishStore to attempt to truncate its file toinitialSizeblocks when it is closed. (AC-405, Z2255) -
Added
Pause,Resume, andRate()toMessage.Optionsfor buildingCommandoptions strings. (AC-406) -
Enhanced
MemorySubscriptionManagerto properly re-issue paused and resumed subscriptions to maintain resume groupings. -
BookmarkStoreimplementations will save the current timestamp if a subscription is started withBOOKMARK_NOWas the best approximation of now in case there is a disconnect before messages are received.
This version introduces the following new features and fixes:
- Removed
nextfromServerChooserandServerChooserImpl. (AC-114) - Added
TimestampandNoSowKeytoMessage::Options. (Z1669, AC-356) - Added persistence of
SowKeyon publish messages if the SowKey is explicitly set on aCommand. Only AMPS servers 4.3x and higher support publishing with an explicitSowKey. (AC-337) - Added persistence of last discarded sequence to publish stores to protect against sending messages that might be seen as duplicates by replication destinations if the server receiving the publish messages had its clients.ack file removed during a restart. (AC-287)
- Added get/set for logon correlation data; additional data about the client that is sent with the logon command. (AC-311)
- Added
prunefunction toBookmarkStorewith implementations inMMapBookmarkStoreandLoggedBookmarkStoreto reduce file size. - 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)
- Attempting to set a store on a client that is already connected will now
throw an
AlreadyConnectedExceptioninstead of aUsageException. (AC-306) - Attempting to call logon on an
HAClientwill throw aDisconnectedExceptionor anAlreadyConnectedException. (AC-306) - Added an
addAllfunction toDefaultServerChooserto add all uris in any forward iterable container of strings at once. (AC-361) - Client will invoke the
FailedWriteHandlerfor all failures. Previously it was only invoked for duplicate and not entitled failures. (AC-339) - Added
noTopicto theReasonclass. - Publish stores save expiration as a string instead of an int. (AC-382)
Storeinterface now only requiresstore(const Message&)and other versions of store are deprecated.StoreReplayerinterface now only requiresexecute(Message&)and other versions of execute are deprecated.- Fixed a bug in
PublishStorewhere recovery from a file containing an item that was saved in multiple blocks including the last and first blocks would corrupt that item. - Fixed a bug in
BlockPublishStorewhere a length could be written across block boundaries and not be recovered correctly. - Fixed a memory leak in
BlockPublishStorein certain error conditions. - Fixed a bug in
PublishStorewhere sow key was not always correctly included when determining the crc for a record. - The version sent to AMPS in logon is now
getVersion() + ":c++"to aid in debugging. (AC-385) - Added
addMessageHandlerandremoveMessageHandlerfunctions toClientso the non-blocking version ofsendcan be used and results will still be handled. (AC-333) SubscriptionManagerinterface has been changed to accept aMessageinstead of many separate arguments. (AC-336)- The
TransmissionTimefield has been renamed toTimestamp. - The following deprecated fields have been removed from
Message(AC-294):MessageTypeSendSubscriptionIDsDataOnlySendOutOfFocusLogLevelUseNamespacesSendEmptyMaximumMessagesSendKeysMessageID
- The logon sample usage message was expanded to detail the format of the expected URI. (Z2191)
- Added
amps_uint64_ttype that is used for sequence numbers on messages. Addedamps_message_get_field_uint64tomessage.c. (AC-383) - Change all
Storeimplementations to set the initial sequence number to a large value based on current time. This prevents backtracking in sequence numbers when simultaneous server and client failures occur and replication is in use. (Z1986, AC-384) - 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) - Fix
MessageStreamiterators with a timeout set to produce the end iterator for commands that have a defined end point, such as sow queries.MessageStreamiterators with a timeout set would previously continue to produce invalid messages after receiving the group_end for a sow command or when a stats ack is returned and the ack is the only message expected. - Improved error message when using a client that has never been connected to a server. (AC-373)
- Changed
executeandexecuteAsyncfunctions ofClientto return all acks that are set on theCommandobject to theMessageStreamorMessageHandler. Previously, acks, such asprocessedacks, that are used internally in theClientwere blocked from being returned. (AC-332) - Allow custom processing of hearbeat messages through the last-chance message handler. (Z2340)
- Add a new maximum retry time parameter to
FixedDelayStrategy. (Z2030) CompositeMessageParserhas fewer dependencies, making it easier to include in standalone programs or AMPS modules. (Z2723)Fieldis now defined in a separate header, rather than being included inMessage.hpp. (Z2723)
C++ version 4.3
Version 4.3.1.3 (September 15, 2015)
This version introduces the following new features and fixes:
- Fix
ExponentialDelayStrategyto never exceed the maximum delay, even when using jitter. (Z2190) - Fix
ExponentialDelayStrategyon Windows to properly retry for the entire maximumRetryTime. (Z2190)
Version 4.3.1.2 (August 21, 2015)
This version introduces the following new features and fixes:
- Fix client to properly process authentication
"retry"acks.
Version 4.3.1.1 (July 16, 2015)
This version introduces the following new features and fixes:
- Fix
MessageStreamto prevent it accruing messages after a reconnect. - Fix
LoggedBookmarkStoreandMMapBookmarkStoreprune()functions on Windows to correctly preserve the file changes at the end of the prune function. - Fix client to make sure that messages reported by AMPS as not entitled are discarded from the client's publish store. (Z1961)
Version 4.3.1.0 (June 23, 2015)
This version of the AMPS C++ client introduces and changes functionality. This version introduces the following new features and fixes:
- 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. - Removed
next()fromServerChooserandServerChooserImpl. (AC-114) - Added
TimestampandNoSowKeytoMessage::Options. (Z1669) (AC-356) - Added persistence of
SowKeyon publish messages if it is explicitly set on aCommand. Only AMPS servers 4.3x and higher support sending an explicitSowKey. (AC-337) - Added persistence of last discarded sequence to publish stores to protect against sending messages that might be seen as duplicates by replication destinations if the server receiving the publish messages had its clients.ack file removed during a restart. (AC-287)
- Added get/set for logon correlation data; additional data about the client that is sent with the logon command. (AC-311)
- Added
prune()function toBookmarkStorewith implementations inMMapBookmarkStoreandLoggedBookmarkStoreto reduce file size. Messagesetters now return the currentMessageto allow setter calls to be easily chained together.- A message stored in the publish store won't attempt to be resent after a reconnect because the store should have already replayed the message during the reconnection process. (AC-328)
- Ensure that all calls to
wait()are in a loop with a timeout to callamps_waiting_function. This allows the calls to be interruptable when the client is used with a wrapper (such as the AMPS Python client). (AC-327) - Clear all
Fieldsthat were created as adeepCopy()of anotherField. (AC-318) - Ensure that failed write handler is called even when no store is configured.
- 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. (Z1615) (AC-217)
- Add
Messagefield setters that take a pointer and length.
C++ version 4.0
Version 4.0.0.6 (May 8, 2015)
This version introduces the following new features and fixes:
- Fixes race condition in
Clientsow,sowAndSubscribe,sowDelete, andsowAndDeltaSubscribemethods where the returned command ID or subscription ID may be incorrect when using aClientfrom multiple application threads. (Z1700) - Fix to make sure that messages reported by AMPS as duplicate or not entitled are discarded from the client's publish store. (Z1640)
Version 4.0.0.5 (April 28, 2015)
This version introduces the following new features and fixes:
- An exception thrown from a user-supplied
ExceptionListenerimplementation could previously result in a fatal exception and program shutdown. These exceptions are now caught and masked. (Z1714)
Version 4.0.0.4 (April 14, 2015)
This version introduces the following new features and fixes:
- Unhandled exceptions from a user message handler that are thrown
in response to a
sow,group_begin, orgroup_endmessage are now caught and sent to the user-supplied exception listener. (Z1649)
Version 4.0.0.3 (March 13, 2015)
This version introduces the following new features and fixes:
- Calling
setHeartbeaton aClientthat is actually anHAClientwon't throw aDisconnectedExceptionif the client isn't yet connected. (Z1570)
Version 4.0.0.2 (March 2, 2015)
This version introduces the following new features and fixes:
- Fixed compiler warnings when compiling the client library 32-bit on Linux. (Z1528)
Version 4.0.0.1 (February 20, 2015)
This version introduces the following new features and fixes:
- Fixed race condition that leads to an occasional
SEGVwhen disconnecting a client, or when shutting down while a client is connected. (AC-283) - Changing the
BookmarkStoreorPublishStoreon a connected client is aUsageException. (Z1407) - Fixed compilation warning when using clang 3.5. (Z1412)
- Fixed race condition that could lead to a
StoreExceptionin aHybridPublishStorein rare circumstances.
Version 4.0.0.0 (December 2, 2014)
This version of the AMPS C++ Client is a major update to the programming interface. It introduces new functionality, and is not fully source compatible with previous versions. See the section on "Updating Applications to 4.0.0.0" in this HISTORY file for information on updating applications.
This release contains the following breaking changes:
- Renamed the
incdirectory toinclude. - Renamed
message typetoprotocolthroughout the clients for consistency with AMPS 4.0 terminology. - Renamed
setUnhandledMessageHandlertosetLastChanceMessageHandler. (AC-197) - Renamed
PublishedDuplicateHandlertoFailedWriteHandler. (AC-280)
This version introduces the following new features and fixes:
- Add new
Commandclass to facilitate more flexible and easier execution of AMPS commands, along withexecuteandexecuteAsyncmethods onClientto 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 onClientto allow for easier iteration of results from AMPS subscriptions, queries and commands. - Add new
ConnectionStateListenerinterface for notification of connection and disconnection from an AMPS Client. - Added new
sowDeleteByKeysandsowDeleteByDatamethods for invokingsow_deletein AMPS withSOWKeysand with exemplar data, respectively. - Fix possible double-free corruption error caused when buffer for messages had to be resized and the receive thread was terminated rather joined.
- Improve performance of processing replayed messages after a disconnect and resubscribe. (AC242, AC243, AC134)
- Avoid spurious timeouts when a signal is raised.
- Removed 22-character limit from command, subscription, and query IDs (AC222)
- Record
sow_deleteoperations in publish stores so that, during replay,sow_deleteandpublishmessages are replayed in the same order they were originally sent. (AC207) - Disallow subscriptions with the "replace" option when no subscription ID is passed, to help prevent programming errors with this option. (AC153)
- Ensure the appropriate subscription ID is used for bookmark logging when multiple subscriptions to the same topic are placed.
- Add
RecordsInserted,RecordsUpdated, andOrderByfields toMessage. (AC106) - Prevent race condition leading to possible crash on exit. (AC218)
- Prevent accidental disconnection during long SOW queries, when using heartbeat functionality.
- Add
CDATAescaping to topic and filter fields for XML protocol. (AC216) - Store and use multiple bookmarks to avoid missing messages when failing over between replication pairs.
- Increased robustness of
publishFlush()method by using newflushcommand on the AMPS server when available. (AC182) - Fix potential hang on Windows when simultaneous commands are executed with no timeout. (AC-190)
- Cause all
sowDeletemethods to request astatsack from the server. - Added support for
orderby,bookmark, andtopNarguments tosow,sowAndSubscribe, andsowAndDeltaSubscribe. - Added optional
subIdparameter to all subscription methods onClient. - Added new enums
Message::CommandandMessage::AckTypethat can be used along withget/setCommandEnum()andget/setAckTypeEnum()to specify command and ack types using enum values instead of strings.
Updating Applications to 4.0.0.0
This release of the AMPS C++ client renames the directory for included
files from inc to include. This may require changes in your Makefile
or project so that your build system can locate the AMPS files correctly.
Throughout the client, message type has been renamed to protocol.
The setUnhandledMessageHandler function has been renamed to
setLastChanceMessageHandler. Replace calls to the function with
the new name.
C++ version 3.8
Version 3.8.0.4 (August 6 2014)
This release of the C++ client changes the format of publish store files. This version of the client will correctly read files created by previous versions of the client. However, previous versions of the client cannot read publish store files created by version 3.8.0.4 and later.
This version contains fixes for the following issues:
- Publish stores now store message expiration. This fix includes a change to the file format for file-based publish stores. This version of the client will correctly read files from previous versions of the client. However, previous versions of the client cannot read publish store files created by version 3.8.0.4 and later of the client. (Z880)
- Applications that use a
Storewill no longer lose the first published message after recovery. Previously, if theStorehad exactly 1 unsent message during recovery, the client would reuse a message sequence number, making the message appear to be a duplicate. (AC200) - Clients 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) - Clients that use a
PublishStorecan no longer incorrectly try to resize to very large sizes after replay. This behavior could cause out of memory errors. (AC200) LoggedBookmarkStorewill no longer throw an exception if there is file error after some data has been recovered and will instead stop recovery after the last good record. This allows recovery in cases where an abrupt client shutdown created a corrupt record at the end of a file. (AC196)
This version also adds the following new functionality:
- Added function 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 version3.8.1.5will return3080105. This is supported for all versions of AMPS 3.8 and later. If the client is connected to an earlier version of AMPS, this function will return 0. (Z884) - Added function to convert a version string to a
size_tfor comparison with what is returned from thegetServerVersionfunction. This function will also work with shortened version strings, such as"3.8".
Version 3.8.0.3 (May 6 2014)
- Prevent possible deadlock on Windows when two or more threads call a synchronous method on the same client at the same time. (Z763)
Version 3.8.0.2 (Mar 6 2014)
- Client now sends correct client version string to the AMPS server.
Version 3.8.0.1 (Feb 24 2014)
- Fix possible double-free corruption error caused when buffer for messages had to be resized and the receive thread was terminated rather than joined.
- The expiration field in published messages had an unnecessary trailing
NULLbyte. This is no longer sent. - The send function now ensures that
ackTypeand all necessary IDs are properly set for all types of messages.
Version 3.8.0.0 (Feb 21 2014)
- Change version number so that major/minor version matches server release. There are no AMPS C++ client releases versioned 3.3 through 3.7.
- Add a
topNparameter to SOW commands to limit the number of messages returned by the SOW query. - Improve interface for replacement subscriptions. Added
subIdparameter to Clientsubscribe,bookmarkSubscribe,deltaSubscribe, andbookmarkDeltaSubscribeso that a replacement subscription can now be made using these functions and to make sure thatSubscriptionManagergets updated. Includes changes toSubscriptionManagerso that replace option isn't sent during a resubscribe. - 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. - Protect against duplicate and lost messages when using bookmark live
subscription and failing over. This adds persisted to
BookmarkStoreclasses as further protection against this problem. - Request persisted acks for bookmark subscription from AMPS server
versions that support it. This ties into the persisted addition on the
BookmarkStoreto fully guarantee all messages are seen during a failover when using a bookmark live subscription. - Fixed a possible crash on Windows from incorrect size for interlocked exchange.
- Get AMPS server version during logon. This allows the client to correctly handle any version-specific differences in behavior, and take advantage of features that are only available on more recent server releases.
publishFlushworks correctly if there is no publish store set. Previously, the request would always time out.- Fixed
HAClientto start heartbeats after logon to avoid authorization failures causing disconnects due to a heartbeat command.
C++ version 3.2
Version 3.2.1.1 (Dec 4 2013)
- Added
publishFlush()to client to ensure all previous publish messages are sent. - Fixed recovery bugs in
RingBookmarkStoreandLoggedBookmarkStorethat caused most recent to be incorrect upon recovery from an existing file.
Version 3.2.1.0 (Nov 15 2013)
- Added
sowDeleteByKeys()to client. - Fixed issue with
duplicateMessageHandlernot being called properly. - Fixed possible corruption of outbound message when responding to a heartbeat.
- Fixed rare race conditions during shutdown that could cause crashes on Linux.
- Fixed issues with 32-bit builds using older Linux/gcc combinations.
- Fixed issues building with Visual Studio 2003 on Windows XP (32-bit only).
- Changed
send()function inClientto not reset IDs onMessagepassed in if they are already set. - Fixed bug in
send()function where a core dump could occur if the only ack type requested was stats. - Update spark to allow user name to be specified as part of server by
using
user@host:portinstead of forcing it to be$USER. - Change encoding of Options field in SOAP messages to match the server.
- Remove delay on
HAClientinitial connection. - Fixed possible crash if
Clientattempts to send to a message to a server but it has never calledconnect()and thus has no transport.
Version 3.2.0.0 (Jun 18 2013)
- Added new
HAClientand associated classes for high availability. - Fixed bug whereby multiple concurrent invocations of
sow(),sowAndSubscribe(), etc. could result in spurious TimedOutException. - Added new
PublishStore,BookmarkStore,SubscriptionManagerimplementations complementingHAClientfunctionality. - Added
setHeartbeatto trigger invocation of server-initiated heartbeat processing.
C++ version 3.1
Version 3.1.0.11 (Apr 2 2013)
- Includes fixes to Windows compilation errors in
tcp.c - Fixed discrepancies in Spark makefile/project file.
Version 3.1.0.10 (Mar 25 2013)
- Fix possible crash when disconnect handler is set to
NULLjust before it is invoked.
Version 3.1.0.9 (Mar 1 2013)
- Fixed hang when calling logon in a disconnect handler.
Version 3.1.0.8 (Feb 26 2013)
- Fixed hang when waiting on persisted ACK of a publish.
Version 3.1.0.7 (Nov 13 2012)
- Added new
reasonparameter toAuthenticator::completed.
Version 3.1.0.6 (Oct 25 2012)
- Added a default value for the
AMPS::Clientconstructor, aiding in creation of arrays and member variables ofAMPS::Client. - Added
AMPS::Client::setName()to allows you to supply a client name after the Client's construction, but before connection. - Added
amps_client_set_name(), the C API equivalent ofAMPS::Client::setName(). - Fixed hang when using spark with
sow_deleteand an XML message type. - Added
amps.vcxprojto the src directory to enable Windows builds.
Version 3.1.0.5 (Sep 19 2012)
- Added version number to the
READMEfile. - Added
NotEntitledException.
Version 3.1.0.1 (Aug 22 2012)
- No changes.
Version 3.1.0.0 (Aug 16 2012)
- New C++ client added.
- Added support for custom authentication modules.
- Added support for TCP transport options
- Fixed numerous shutdown/reconnect hangs and race conditions.