Diffusion Cloud 6.0 Release Notes

6.0.9 (7 Feb 2019)

Changes made to existing features at release 6.0.9

.NET Client: Improved memory profile during connection loss (19951)

Previously a connection loss under high load could cause a significant increase in memory usage due to the exceptions thrown by asynchronous methods. The behavior has now been changed so that a GC has an easier time cleaning up memory during a connection loss so that the increase in memory usage won't be quite as severe.

Logging: PUSH-000581 should contain the HTTP request that triggered the log message (20066)

If the server fails to handle an HTTP request, it logs a PUSH-000581 info message. The log message now includes the details of the HTTP request and the remote address.

Web Server/HTTP: Maximum HTTP header size extended (19925)

The maximum size of an HTTP request header has been increased from 4K to 16K, preventing exceptions stating "HTTP header is too long at line ..."

Bugs cleared at release 6.0.9

.NET Client: ISession.Attributes always returns null (19676)

The ISession.Attributes property would always return null. This has now been fixed to return a ISessionAttributes instance.

.NET Client: Connection establishment can be stuck with high CPU (19832)

A websocket connection or reconnection could get stuck in a infinite loop during the handshake phase. This has now been fixed.

.NET Client: The request of a cancelled task is still being sent to the server (19971)

A asynchronous request to the Diffusion server (such as AddTopicAsync for example) that got invoked with a canceled CancellationToken would send the request to the server before completing the returned Task in a canceled state. This behavior has been changed now. Any asynchronous request that gets invoked with a canceled CancellationToken will immediately complete in a canceled state and NOT send the request to the Diffusion server.

Android Client: Stream support does not work on API 24+ (19568)

The Diffusion Android client library includes the backports of JDK 8 classes for compatibility with versions of Android earlier than API 24. This release fixes a bug in the packaging of the backported classes which caused an incompatibility with Android versions API 24 and above.

JavaScript Client: RecordContent docs for JavaScript are missing addRecord() function description (19398)

Added the missing description for method RecordContent.addRecord().

JavaScript Client: RequestContext field 'sessionId' is written with capital 'S' and maps wrongly (19667)

Fixed TypeScript definition of RequestContext.sessionId

JavaScript Client: RangeQuery.fromSequence is not a function (19669)

Using RangeQuery.fromSequence resulted in a runtime error: "TypeError: session.timeseries.rangeQuery(...).fromSequence is not a function". This has been resolved by fixing the TypeScript definition to change the interface function to "from".

JavaScript Client: `details` property in `subscribe` event lacks a type and a description (19776)

Added documentation for `details` property in Subscription#subscribe

JavaScript Client: Updater does not implement updateValue (19838)

Updater.updateValue has been implemented

JavaScript Client: session.select() fails when given a SelectorSet topic selector (19856)

session.select() and other methods taking a string type topic selector will now also accept a TopicSelector

Server: Correct handling of WebSocket fragmented frames (19486)

A bug has been fixed in the server handling of fragmented WebSocket frames. This affected requests sent from JavaScript clients to the server. For example, it could cause the console to disconnect following a large number of topics notifications from the server.

6.0.8 (6 Sep 2018)

Bugs cleared at release 6.0.8

.NET Client: Escaped backslash at the end of a JSON string causes InvalidDataException (19246)

An escaped backslash at the end of a JSON string ( "\\" threw an InvalidDataException. This behavior has now been fixed.

.NET Client: Establishing a secure connection with an invalid server certificate not failing as expected (19276)

SSL certificate validation was not taking place correctly. This behavior has now been corrected. When trying to connect with an invalid server certificate, the connection now fails. When testing or using a self-signed certificate, you may wish to override the default behavior by supplying your own validation code. For example: ISessionFactory.SslContext((sender, cert, chain, errors) => {\* your validation here *\});

Java Client: gettingstarted/PublishingClient.java example uses incorrect class. (19209)

The PublishingClient.java now uses the Long.class instead of Integer.class for the topic type of int64.

6.0.7 (14 Aug 2018)

Bugs cleared at release 6.0.7

Replication: Session replication memory leak leading to reduced performance (19212)

Diffusion was incorrectly retaining details of closed sessions in the Hazelcast datagrid used for session replication. This caused Diffusion clusters with session replication enabled to leak memory, leading to reduced performance. The issue is now fixed.

6.0.6 (31 Jul 2018)

Bugs cleared at release 6.0.6

Apple Client: Interfaces set to be removed not marked as deprecated (18914)

The following interfaces are set to be removed in a future version, and should have been deprecated in 6.0. recordContent property on PTDiffusionContent, recordContentWithSchema:error: method on PTDiffusionContent, PTDiffusionTopicAddFailReason, PTDiffusionTopicAddFailReasonErrorKey

Demos: Missing dependencies for Sportsbook demo viewer (18932)

The Sportsbook demo viewer was missing dependencies for angular.js, jQuery and bootstrap, meaning the demo did not work. This is now fixed.

JavaScript Client: datatypes.string().readValue silently reads non-string CBOR (17314)

DataType classes Int64, String and Double would read values that were not CBOR strings without returning an error. This is fixed, and they now throw an error if deserializing CBOR of an incorrect type, as documented.

JavaScript Client: JavaScript clients using exclusive updaters sometimes failed to calculate deltas (18896)

Previously, JavaScript clients using exclusive updaters to update topics could sometimes fail to calculate a delta between two values. The defect has been corrected.

JavaScript Client: PUSH-000473 messages logged on closing session properties listener (19071)

When a session properties listener is closed, session property events can still be delivered for a short while. The JavaScript client wrongly handled this as an error, logging "failed: 0: No such conversation" on the server. Closing the Diffusion web console could trigger this issue. The JavaScript client no longer handles this as an error.

JavaScript Client: Error decoding CBOR for compressed JSON topics (19113)

Compressed topic values and updates could be processed out of order by the JavaScript client. This was especially visible when subscribing to stateful topics. This issue is now resolved.

Server: Requests with invalid URLs logged as "unhandled exception" (19065)

When the Diffusion server received a request with a URL containing an illegal character, it logged a PUSH-000664 "unhandled exception" error message. The server now handles such a case by closing the request as incorrect.

6.0.5 (24 May 2018)

Bugs cleared at release 6.0.5

.NET Client: HTTPProxy connection would always fail (18809)

A bug prevented the .NET client establishing a session using an HTTP proxy. This issue has now been resolved.

.NET Client: Session timeout during connection (19328)

Fragmented handshake response packets have not been handled correctly during the connection of a newly created session. Sessions would simply time out during connection. This behavior has now been corrected.

C Client: update_value does not notify callbacks of update success or failure (18675)

After using the update_value function, the on_update_success and on_update_failure callbacks should report success or failure. Due to a bug, they were not called as intended. This is now resolved.

JavaScript Client: Type definitions for the Diffusion NPM module are incorrect (18824)

The definitions included in the "diffusion" module published to NPM incorrectly exported the definitions. This caused the correct usage of the JavaScript library to generate compilation errors. This has been fixed to make TypeScript usable with the node client without having to include the web definitions on top of those packaged in the module.

JavaScript Client: Error for missing message handler is incorrect (18852)

When a JavaScript client received messaging for which it had not established a stream, the server log recorded a misleading ErrorReasonException: "First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object". The misleading log message has been replaced with a more informative message stating that there is no registered message handler for the path.

Logging: Incorrect server log message when update source registration fails (18721)

When an update source registration failed, the server logged an incorrect message where the session id and topic path were the wrong way around. This has now been fixed.

Replication: Partition can be left unclaimed if it is migrated before recovery (18656)

If a partition is migrated during network partition recovery, it is possible for all members of a cluster to believe that is claimed by another member of the cluster. This can prevent topic operations with the CLUSTER_REPARTITION error reason for some topics. This issue has been addressed by attempting to claim partitions associated with closed peer connections.

Replication: When the cluster master shuts down a new master may fail to be selected (18749)

When the cluster master shuts down, all other servers attempt to claim ownership. In some cases, they will all fail to claim ownership since it is still held by the shutting down server. This can prevent certain cleanup operations being applied to the cluster, leaking memory and other resources. This has been fixed so that the server being shut down does not hold onto ownership and another server will be able to claim ownership. These changes mean that incremental upgrading of the cluster will not work.

Replication: Partition fails to be claimed by new owner (18776)

When a Hazelcast partition begins to migrate to a different owner, an entry processor is used to update the owner and increment a generation counter. If the entry processor ran before migration was complete, it failed to update the owner or increment the generation. This prevented other servers recognizing that ownership had changed, and caused all operations applied to that partition to fail with the CLUSTER_REPARTITION error reason. This has been fixed by retrying the entry processor until it succeeds or the generation changes (which indicates that another server has claimed the partition).

Replication: Compaction failure in backup partition log (18897)

An issue with compacting the replicated topic log could cause the server to shut down. This happened when compacting a log with a delta update followed by a topic mapping. The mapping caused the last value to be lost before attempting to apply the delta. In most cases, compaction happens either beginning from topic mappings or without them present. The issue is now fixed by preserving the last value when the topic mapping is applied.

Replication: Partitions left unclaimed during startup in a server cluster due to race condition (18898)

When starting a Diffusion server in a cluster, some partitions could remain unclaimed. This issue was caused by a race condition when setting up a listener for partition migrations. This could cause some operations to fail with the CLUSTER_REPARTITION error reason.

Server: Unsubscribe could corrupt data structures and cause NullPointerException when evaluating selections (18774)

Under rare circumstances, a bug could result in corrupt internal data structures following an unsubscribe operation. This prevented correct evaluation of new topic selectors. A NullPointerException error similar to the following would appear in the server log. 2018-04-24 16:46:36.619|ERROR|multiplexer1|PUSH-000229|Error while handling a multiplexer event.|com.pushtechnology.diffusion.multiplexer.impl.AbstractMultiplexer java.lang.NullPointerException at com.pushtechnology.diffusion.multiplexer.server.ServerMultiplexerStateImpl.lambda$evaluateSelections$0(ServerMultiplexerStateImpl.java:293) at com.pushtechnology.diffusion.collections.UnsafeBitSetAccess.wordForEach(UnsafeBitSetAccess.java:128) at com.pushtechnology.diffusion.collections.UnsafeBitSetAccess.internalSparseForEach(UnsafeBitSetAccess.java:110) at com.pushtechnology.diffusion.collections.UnsafeBitSetAccess.forEach(UnsafeBitSetAccess.java:63) at com.pushtechnology.diffusion.multiplexer.server.ServerMultiplexerStateImpl.evaluateSelections(ServerMultiplexerStateImpl.java:293) ... The bug has been fixed in this release.

6.0.4 (28 Mar 2018)

Bugs cleared at release 6.0.4

.NET Client: PushTechnology.ClientInterface.Data.JSON.IJSON.ToJSONString() throws error on empty string (18420)

PushTechnology.ClientInterface.Data.JSON.IJSON.ToJSONString() would throw an exception if the JSON contained empty string values. This has now been resolved.

.NET Client: The ClientControl.setThrottled method incorrectly documents that it enables conflation (18615)

The IClientControl.setThrottled method incorrectly documents that it enables conflation. It does not enable conflation when setting the throttler. The documentation has been fixed.

Demos: Sportsbook demo links to Push-hosted diffusion.js file (18466)

The Sportsbook demo linked to an older version of the diffusion.js hosted on Push Technology servers. This meant that the demo did not work without an Internet connection. The latest release of diffusion.js is now bundled with the demo.

Java & Android Client: The ClientControl.setThrottled method incorrectly documents that it enables conflation (18616)

The ClientControl.setThrottled method incorrectly documents that it enables conflation. It does not enable conflation when setting the throttler. The documentation has been fixed.

JavaScript Client: RecordV2.diff gives wrong result when first record has no fields (18062)

The RecordV2.diff method did not indicate new fields added to the first record when the original data contained just a single empty record. This has now been resolved.

JavaScript Client: Fallback streams emit subscription event when session is closed (18440)

Fallback streams wrongly emitted a subscription event when a client session was closed. This has now been fixed.

JavaScript Client: Date objects encoded as empty objects when updating JSON topics (18486)

The JavaScript Date object is now encoded as a CBOR string when updating JSON topics.

JavaScript Client: TypeScript Result does not define type for Error when the result is rejected (18547)

TypeScript will now correctly show the Error type return from the Result object when the result is rejected. Previously the Error type was shown as "any".

JavaScript Client: Updating Double topics with integer values causes wrong encoding (18553)

In previous releases, updating a Double topic type with an integer value could cause the value to be incorrectly encoded as an Int64, potentially leading to failures when the value was accessed from other client APIs. The newly added method 'updateValue' avoids this problem by taking a data type as an extra parameter, so that the value can be encoded directly with the provided data type. We recommend you use the new 'updateValue' method.

Monitoring: Subscription messages are not counted towards publisher statistics (18612)

Subscription notifications were not counted towards publisher statistics, so the statistics under-reported the number of messages and bytes sent. Subscription notifications are now included in the statistics.

Server: Server fails to handle invalid update source topic paths (18351)

If a client session attempted to register an update source using an empty or invalid path (for example, "/"), the server would log an IllegalArgumentException and the operation would never complete. This has been rectified to add the appropriate error handling and report an INVALID_PATH error to the client.

Server: Raw "token recognition error" in log on MessagingControl invalid sendRequestToFilter (18367)

When the Diffusion server received a session property filter which was wrongly formatted (for example, with '@' instead of '$'), the server logged a raw parsing message and the client was not notified of the problem. The server now adds a log entry with an appropriate message that operation has failed (PUSH-000472), and reports the error to the client.

Server: Requests from different sessions were not load balanced across available handlers (18546)

Control sessions can register multiple handlers with the server, including message handlers, authentication handlers, and queue event handlers. Due to a bug in previous releases, if multiple handlers were available, requests from different sessions were all routed to the same handler. The bug has been fixed. If multiple handlers are available, requests from different sessions are now distributed across them. Repeated requests from the same session are routed to the same single handler in a "sticky" fashion.

Server: ArrayIndexOutOfBoundsException queue overflows dispatching topic notifications (18603)

When queuing topic notifications, the server can overflow the outbound queue for a session. This sometimes produced an ArrayIndexOutOfBoundsException in the server log. This happened when the server attempted to queue a notification for a session that had already overflowed the queue. The server will no longer attempt to queue these notifications.

6.0.3 (15 Feb 2018)

Bugs cleared at release 6.0.3

.NET Client: RecordV2.diff gives wrong result when first record has no fields (18036)

The IRecordV2.Diff method did not indicate new fields added to the first record when the original data contained only a single empty record. This has now been resolved.

.NET Client: PushTechnology.ClientInterface.Data.JSON.IJSON.ToJSONString() returned invalid JSON (18380)

PushTechnology.ClientInterface.Data.JSON.IJSON.ToJSONString() could in some instances return invalid JSON. Most common errors were missing commas after empty array values and un-escaped control characters in field names or string values. This has now been fixed.

Apple Client: JSON request streams and handlers not adapting primitive values (18297)

Fixes a bug in messaging where JSON request streams and handlers would not accept primitive values.

C Client: Message loss when client internal queue limit is reached (18226)

A flow control mechanism has been introduced which applies back pressure to the C client's internal queue. This ensures that messages will not be lost as a consequence of an application reaching its internal queue limit.

Client: Topic notification feature incorrectly emits descendant notifications for empty topic paths (18006)

When using the topic notification feature, descendant notifications were incorrectly emitted when selecting or deselecting multiple topics in the same branch, e.g. "?a/.*/.*". This has now been fixed.

Client: Poor error handling when older client gets topic details for a topic type it does not support (18359)

A request from an older client to get topic details for a topic of a new, unknown type will fail. The error message provided to the client has been improved.

Console: Console labels for the message statistics misleading (18103)

The message statistics graph in the Diffusion console has been renamed from "Message Rate statistics" to "Message Statistics" in order to accurately reflect the displayed data.

Console: Console doesn't know about time series topic specific permissions (18410)

Console now displays time series topic specific permissions.

Documentation: Update compatibility hierarchy diagram to include RecordV2 datatype (18243)

The type compatibility diagram in the Java API documentation has been updated to include the RecordV2 data type.

Java Client: Published diffusion-client and diffusion-jms-client JARs declare simple SLF4J binding as dependency (18102)

The diffusion-client and diffusion-jms-client JARs published to our Maven repository declared the simple SLF4J binding as a dependency. This may have prevented the use of your chosen SLF4J binding. The dependency has been replaced with one for the SLF4J API. This will allow you to select the logging framework to use. If you do not include a binding as a dependency, no logging will be generated.

Java and Android Unified API: Session addListener and removeListener methods: correct handling of null parameters (18191)

In release 6.0, the standard policy was changed to throw a NullPointerException rather than an IllegalArgumentException if a null argument is passed to a mandatory API parameter. The Session.addListener() and Session.removeListener() methods were not correctly updated to perform this check. This has been rectified.

JavaScript Client: TypeScript definitions for topic notifications feature incorrect (18152)

The TypeScript definition for topic notifications specified an incorrect method name for adding topic notification listeners. This prevented writing TypeScript code using the topic notifications feature that satisfied the definitions and called the correct method. The definitions have been updated to use the correct name.

JavaScript Client: Missing topic types in web friendly TypeScript definitions (18258)

Not all of the topic types are included in the TypeScript definitions packaged with the Diffusion server. The definitions have been added.

JavaScript Client: Topic notification feature produces malformed TopicSpecifications (18268)

When using the topic notification feature in the JavaScript client, topic notifications would provide incorrectly formed TopicSpecification instances. This has now been resolved.

JavaScript Client: TypedSubscription and ValueStream TypeScript definitions declare methods that are not implemented (18310)

The TypeScript definition for ValueStream and TypedSubscription were not correct. They extended Subscription including methods like asType that are not implemented for the ValueStream. The definition has been changed to extend Stream.

JavaScript Client: Support for custom credentials with browser typed arrays (18345)

Custom credentials are now supported with browser typed arrays (such as Int8Array), or by providing an array of octets for browsers that do not support typed arrays.

JavaScript Client: Streams that are closed because the session is closed should raise the error event (18346)

Streams will now emit an error event if the session is closed.

JavaScript Client: Data types name for recordv2 should be record_v2 (18355)

DataTypes.js getByName() should match record_v2 and not recordv2. This has now been resolved.

JavaScript Client: Update topics on reconnect caused "Error: Peer is disconnected" after a failover (18372)

An issue preventing the JavaScript client from updating topics after a failover was resolved.

Server: Using wildcard selector with topic notifications feature causes a TopicPathSelectionCache exception (18117)

When using topic notifications, registering a wild card selection (e.g. ?foo.*) resulted in a TopicPathSelectionCache exception on the server when multiple topics matching that selector were added or removed. This has now been fixed.

6.0.2 (16 Nov 2017)

Changes made to existing features at release 6.0.2

Apple Client: Support for recordV2 structural deltas (17822)

Adds the diffFromOriginalRecord: method to PTDiffusionRecordV2 instances, returning a structural delta representing the changes between the two record objects.

Bugs cleared at release 6.0.2

Adapters: Push Notification Bridge assumes SLF4J API is in the classpath (18021)

The Push Notification Bridge incorrectly assumed the SLF4J classes were on the classpath established by the start script (pn_bridge.sh or pn_bridge.bat). This has been corrected.

Adapters: NullPointerException thrown by JMS Adapter if <topics> not specified (18048)

JMS adapter now correctly throws an APIAdapterException instead of a NullPointerException when the topic being subscribed to has not been created by the JMSAdapter.

Apple Client: PTDiffusionRecordV2Builder is missing from the framework umbrella header (18030)

Neither the header file or symbols for the PTDiffusionRecordV2Builder class were being distributed with the Apple client library. This oversight has been fixed.

C Client: Slave topics not supported in C Client (17992)

The C client API can now add slave topics. If you want to use this with existing applications, you need to recompile the source code with the new client library. This is due to a necessary change in the API's implementation.

Demos: Sportsbook demo infinite loop (17968)

Addresses an issue where the Sportsbook demo could potentially be stuck in an infinite loop whilst redistributing odds.

Java & Android Client: RecordV2.diff gives wrong result when first record has no fields (17989)

The RecordV2.diff method did not indicate new fields added to the first record when the original data contained just a single empty record. This has now been resolved.

Java & Android Client: Split-path and full-path selectors containing regex quoting can fail to match (17994)

A split-path pattern selector containing an escaped regex metacharacter could fail to match a corresponding topic path. For example, the regex ?a\\$ failed to match the topic path a$. This has now been resolved.

Server: Fragmented WebSocket connection requests can fail with NullPointerException (18016)

Due to a bug, the server could fail to process a WebSocket connection request that was split across multiple network packets. The client would fail to connect, and a NullPointerException would be logged. The bug has been fixed in this release.

6.0.1 (23 Oct 2017)

Changes made to existing features at release 6.0.1

Apple Client: Add free format record values to RECORD_V2 (17840)

Adds PTDiffusionRecordV2Builder to RECORD_V2, enabling the generation of free format record values which are not constrained by a schema.

Bugs cleared at release 6.0.1

.NET Client: .Net examples use the incorrect client version (17867)

The .NET examples tried to import the .NET Client Library version 5.9.0 (instead of 6.0.x). This has now changed so that the example projects import the .NET Client Library which is available in the specified folder, regardless of its version.

Apple Client: Set methods on PTDiffusionMutableRecordV2Model failing for some schemas (17875)

A bug in PTDiffusionMutableRecordV2Model meant that, for most schemas, calls to either setFieldValue:forKey:error: or setRecordName:recordIndex:fieldName:fieldIndex:toFieldValue:error: would fail. This is now fixed.

Apple Client: Unrecognized selector exception raised when getting recordValueUpdater from a PTDiffusionTopicUpdater instance (17931)

An exception was raised by the client library when accessing the recordValueUpdater property on a PTDiffusionTopicUpdater instance. This is now fixed.

Apple Client: Missing request property on PTDiffusionRecordV2 instances (17940)

The request property to the PTDiffusionRecordV2 interface was not implemented. This has now been added, allowing record values to be used as requests in applications using the messaging and messaging control features.

C Client: Windows examples compile but fail on execution (17866)

The JSON publishing examples crashed on Windows. This has now been fixed. The publishing and subscribing example have also been changed to use a simple JSON structure that represents the current date and time. The example topic name has also changed to 'time'.

C Client: cbor_to_json() outputting invalid JSON string (17899)

The C API function cbor_to_json was outputting invalid JSON objects from both definite and indefinite CBOR map inputs. This error has been corrected.

C Client: C client creating sub-optimal deltas (17902)

The C client published valid, but sub-optimal deltas upon publication of a topic state change. This has been resolved.

C Client: Linux shared library mistakenly included (17963)

The Linux shared library was included in the C client distribution unintentionally. It has now been removed.

Java Client: Java examples using incorrect compiler (17929)

The Java examples wrongly used the 1.7 compiler. This has now been resolved.

Java Client: CompletableFuture<Object> replaced with CompletableFuture<?> (17971)

CompletableFuture<Object> is not forward compatible with future iterations of the API. It was intended to allow future versions to return non-null values of types that had not been settled on. It is used by several features in the 6.0 API. CompletableFuture<Object> means that the completable future should return the exact object. It was intended that it should be able to return some subtype of the object. The type that should have been used is CompletableFuture<?>. API methods that returned CompletableFuture<Object> have been updated to return CompletableFuture<?>. This breaks compile-time compatibility, but not runtime compatibility. This allows for future API changes to be made without breaking compatibility.

JavaScript Client: Invalid JSON value when receiving C client delta values (17901)

JavaScript clients subscribing to JSON topics updated by C control clients were affected by an issue that caused the messages to arrive malformed. This has now been resolved.

JavaScript Client: Incorrect encoding of session tokens preventing reconnection (17903)

JavaScript clients using the HTTP polling transport incorrectly encoded the session token when making reconnection requests. This would sometimes prevent reconnection. The HTTP polling transport has been updated to correctly encode session tokens.

6.0.0 (5 Oct 2017)

Features introduced at release 6.0.0

.NET Client: Support for recordV2 topic type (17303)

A new topic type of recordV2 has been introduced to replace the record topic type which has been deprecated. This topic type is supported by the new IRecordV2DataType. The new topic type is a 'universal' topic type and therefore supports automatic client side delta handling, overcoming restrictions in the use of the old record type.

Apple Client: Messaging control added (13168)

Adds messaging control feature capabilities to the Apple API. This includes the ability to communicate directly with other client sessions, registration of message handlers and typed request-response messaging.

Apple Client: Support for recordV2 topic type (17301)

PTDiffusionTopicType_RecordV2 has been introduced to replace the PTDiffusionTopicType_Record topic type, which has been deprecated. The new recordV2 topic type supports automatic client side delta handling, overcoming restrictions in the use of the old type.

C Client: JSON and binary topic support for C (15243)

The C API now supports JSON and binary topics.

Java & Android Client: Request/response messaging (14613)

Introduces a "request-response" addition to the Messaging API. Requests in the form of typed messages can be dispatched to a specific session, to a number of sessions matching a specific filter, or to a message path (to which a server registered handler on that path will receive the request). This functionality is in line with the standard Messaging API. The requester will be given a typed response or an error.

Java & Android Client: Topic Notification Feature (15301)

Introduces the Topic Notification feature. Users may select topic paths, for which notifications of the presence, addition or removal of matching topics will be received. This allows users to build a view of the topic model held within the server.

Java & Android Client: Java 8 API enhancements (15784)

Most API methods that notify asynchronous completion via a callback interface now have a non-callback alternative that returns a Java 8 CompletableFuture. The CompletableFuture variants provide more precise error reporting, and should be preferred for new application code.

Java & Android Client: ClientControl: setSessionProperties (15925)

Added ClientControl#setSessionProperties. This provides a control client with sufficient privilege with the ability to modify other clients' session properties. For more information please see ClientControl#setSessionProperties API documentation.

Java & Android Client: Support for xhr and xhrs URLs (16224)

Java client can now connect to the server with xhr or xhrs URLs, such as xhr://localhost:8080.

JavaScript Client: Ping feature added (13160)

The JavaScript client now provides the Ping feature, accessed via Session#pings. This allows a client to ping the Diffusion server in order to determine the round-trip latency of the connection.

JavaScript Client: Topic Notification Feature (16412)

Introduces the Topic Notification feature. Users may select topic paths, for which notifications of the presence, addition or removal of matching topics will be received. This allows users to build a view of the topic model held within the server.

JavaScript Client: Request/response messaging (16790)

Introduces a "request/response" addition to the Messaging API. Requests in the form of typed (to the Datatype API) messages can be dispatched to a specific session, to a number of sessions matching a specific filter, or to a message path (to which a server registered handler on that path will receive the request). This functionality is in line with the standard Messaging API. The requester will be given a typed response or an error.

Topics: String, int64, and double topic types (15239)

String, int64, and double topic types have been added. These provide similar capabilities to the deprecated single value topic type, but can be used with the new persistence and and improved topic replication capabilities.

Topics: Slave topics can now map to a master topic that does not exist. (15352)

The master topic that a slave topic refers to no longer needs to exist at the time the slave topic is created. In this case an 'unbound' slave topic is created which is invisible to subscribers. When the master topic is later created any unbound slaves that point to it are attached and become visible. When a master topic is removed the slaves are no longer removed, but instead become unbound (and subscribers are unsubscribed). Such an unbound topic would rebind if the master is then recreated. Slave topics therefore need to be explicitly removed. Slave topics created by the client API may no longer bind to topics created using the classic Publisher API. The behavior of slave topics created using the classic Publisher API remains as before (i.e. master topics must exist when slaves are created and slaves are automatically removed with the master). However, the Publisher API can no longer create a slave topic which binds to a topic created using the Client API.

Topics: Time series topics (15886)

A new "time series" topic type has been added that stores an ordered series of events. Time series topics are useful for collaborative applications, for example chat rooms. Multiple users can concurrently update a time series topic. Each event has a value and associated metadata including a sequence number, a timestamp, and author. New subscribers are sent a configurable window of the latest events, followed by new events as they happen. A separate query API allows events to be retrieved from the log maintained by the topic. Time series topics support topic replication and topic persistence. Client support for time series topics will be delivered incrementally. In this release, the JavaScript, Java, Android, and Apple APIs have full support for time series topics and allow creation, subscription, query, and update. The .NET and C APIs do not support time series topics.

Topics: Topic removal leaves topics for which session lacks permission, instead of failing (16031)

Previously, an attempt to remove a number of topics could fail with a permissions error if the caller did not have access to one or more of the selected topics. In this case, some topics that the caller did have permission to remove may not have been removed. This is no longer the case: all topics that match a selector that the caller has permission to remove will be removed. This means that an exception will no longer occur if the caller did not have sufficient permission to all of the topics. Session wills (set up using removeTopicsWithSession) previously only required permission to the branch path that it specified in order to remove all topics beneath that branch. Now only those topics that the caller has permission to remove beneath the branch will be removed. The client API is no longer allowed to remove topics created using the classic Publisher API and the classic Publisher API may no longer remove topics created using the client API.

Topics: RecordV2 topic type (16157)

A new recordV2 topic type has been introduced to replace the record topic type which has been deprecated. This topic type is supported by the new RecordV2DataType. The new topic type is a 'universal' topic type and therefore supports automatic client side delta handling, overcoming restrictions in the use of the old record type.

Changes made to existing features at release 6.0.0

.NET Client: New AUTHORIZATION unsubscribe reason (14840)

A new unsubscription reason (UnsubscribeReason.AUTHORIZATION) has been added which is used to report unsubscriptions due to a change in a session's assigned security roles.

.NET Client: Enable maximum queue size to be configured (15167)

A maximum queue size can now be set for .NET clients.

.NET Client: IMessaging.GetStreamsForTopic is deprecated (16069)

IMessaging.GetStreamsForTopic() is deprecated and will be removed in a future release.

.NET Client: DiffusionExceptions deprecated (16274)

The following exceptions have now been deprecated: DiffusionBaseException, DiffusionException, DiffusionFatalException, DiffusionAPIException, DiffusionMessageException, DiffusionPropertyException, and DiffusionConnectionException. Use Exception types defined in the API documentation instead.

.NET Client: Removed ITopics.RemoveTopicStream(ITopicStream) (16308)

The deprecated ITopics.RemoveTopicStream(ITopicStream) has now been removed. Please use ITopics.RemoveStream(IStream) instead.

.NET Client: Deprecated DefaultStreamCallback and StreamDefault (16329)

PushTechnology.ClientInterface.Client.Callbacks.DefaultStreamCallback and PushTechnology.ClientInterface.Client.Callbacks.StreamDefault do not fit the standard naming scheme and have been deprecated. Use PushTechnology.ClientInterface.Client.Callbacks.DefaultStream instead.

.NET Client: Deprecated ErrorReason.FromValue(int) (16331)

PushTechnology.ClientInterface.Client.Callbacks.ErrorReason.FromValue(int) has been deprecated. This method has no real value because only pre-defined reasons can be obtained with it. It will be removed in future versions of the .NET Client Library.

.NET Client: Deprecate ISession.GetXXXFeature() methods (16458)

ISession.GetXXXFeature() methods have been deprecated - use XXX property instead. e.g: Instead of ISession.GetTopicsFeature() use ISession.Topics.

.NET Client: No constraint on maximum message size of inbound messages by default (16859)

The default maximum message size has been changed to int.MaxValue, so the inbound message size is effectively unlimited. Applications can be modified to restore the previous limit by modifying the appropriate SessionFactory: sessionFactory = sessionFactory.MaximumMessageSize( 32768 );

.NET Client: API methods no longer throw SessionClosedException (16958)

In previous releases, each API method threw SessionClosedException if the session was known to be closed on entry, and via its callback parameter if the session was closed during the operation. Now each method only reports session closure via its callback parameter. This change simplifies the API by removing the need for applications to handle SessionClosedException as well as handling asynchronous notifications via callbacks. The async variants introduced in 6.0 report session closure by returning a Task that will complete exceptionally with a SessionClosedException.

.NET Client: Socket buffer sizes no longer need to be larger than maximum message size (17036)

Previously, the maximum message size could be no larger than the input and output buffer size. Now the maximum message size can be set to any size, independently from the input and output buffer size. This is useful when you want to set the maximum message size to a high value while keeping the input and output buffers small.

.NET Client: Streams, handlers, and callbacks now behave consistently when a session is closed (17047)

The behavior of the following handlers has changed: - ISessionPropertiesListener - ITopicControlTopicEventListener - ITopicUpdateSource - The ITopicTreeHandler passed to ITopicControl.RemoveTopicsWithSession() If one of these handlers is registered when the session is closed, it will be notified through the OnError() callback with the error reason ErrorReason.SESSION_CLOSED. In previous releases, OnClose() was called. This aligns these handlers with callbacks and the async methods added in 6.0.

.NET Client: ITopicDetails is deprecated (17730)

The ITopicDetails interface is only necessary to support the stateless, single value, and record topic types, and has been deprecated in this release along with those topic types.

.NET Client: ITopicStream is deprecated (17743)

The ITopicStream interface is only necessary to support the stateless and record topic types, and has been deprecated in this release along with those topic types. Instead, use other topic types together with IValueStream.

Apple Client: Proxy support (12612)

Apple clients can now use tunnelling Diffusion connections through an HTTP proxy. A new property, httpProxyConfiguration, has been added to the session configuration interface.

Apple Client: Call error handlers when feature methods used after session closure (13631)

Completion handler blocks and delegates are now informed of an error condition in the case that a method on a feature is called when its owning session is closing or closed.

Apple Client: Add capability to configure maximum size for server to client messages (13792)

Adds a property to the session configuration API, allowing the client's maximum message size to be configured.

Apple Client: Updating of typed topics with live value updaters (14819)

Adds methods to PTDiffusionTopicUpdater instances enabling access to live value updaters for binary, JSON, recordV2, string and number topics. These are provided by the new PTDiffusionValueUpdater and its PTDiffusion*ValueUpdater subclasses.

Apple Client: Enable maximum queue size to be configured (15162)

It is now possible to configure the maximum outbound queue size for a client connection via PTDiffusionMutableSessionConfiguration.

Apple Client: Improved CLOSED_BY_SERVER detection (15327)

Upgrades this client to support a previously introduced internal protocol change improving notification that a session has been closed on the server. The client session will transition to a 'closed' state rather than 'recovering' under more circumstances, avoiding unnecessary reconnection attempts.

Apple Client: Reliable reconnection buffer (15744)

Adds a recovery buffer for messages sent to the server. The size of the buffer can be configured through the PTDiffusionMutableSessionConfiguration API.

Apple Client: Update messaging feature doc and params to refer to 'path', not 'topic path' (15762)

Deprecates methods on PTDiffusionMessageFeature that feature the word 'Topic' in their selector. This makes it clearer that the paths used for messaging are not tied to the topic tree.

Apple Client: Pass open request path on for load balancers (15948)

Adds the ability to pass additional information on to a load balancer in the request path of the URL used to connect to Diffusion.

Apple Client: Add principal property to Session interface (16032)

PTDiffusionSession instances now have a principal property, with support for KVO.

Apple Client: Create topic using TopicSpecification (16034)

Topics can now be created using a PTDiffusionTopicSpecification.

Apple Client: No constraint on maximum message size of inbound messages by default (16861)

The default maximum message size has been changed to NSUIntegerMax, so the inbound message size is effectively unlimited. Applications can be modified to restore the previous limit by modifying their session configuration: sessionConfiguration.maximumMessageSize = 32768;

Apple Client: Remove support for NSCoding and NSSecureCoding (17087)

Support for Apple's NSSecureCoding protocol has been removed. It was only supported by some classes, being an unnecessary distraction from the core functionality. BREAKING CHANGE for any clients which rely on this protocol.

Apple Client: Reduce need for Swift protocol implementations to require @objc (17364)

Optional methods have been removed from all protocols that are defined by the Apple client library. This brings an advantage for Swift developers in that they will now no longer require @objc in their protocol implementations. BREAKING CHANGE. This change may break existing Objective-C and Swift implementations. On upgrading a codebase to use this new version of the client library it is essential to implement all required protocol methods where they were previously optional. Xcode will emit compiler warnings about these methods needing implementation - ignoring these warnings may result in a runtime crash.

Apple Client: Support Swift try by marking throwable init methods as nullable (17372)

Initialisation methods for PTDiffusionJSON instances are now annotated as nullable in order to properly support try/throw when used from Swift.

Apple Client: PTDiffusionTopicDetails is deprecated (17731)

PTDiffusionTopicDetails is only necessary to support the stateless, single value, and record topic types, and has been deprecated in this release along with those topic types.

Apple Client: PTDiffusionTopicStream is deprecated (17744)

The PTDiffusionTopicStream interface is only necessary to support the stateless and record topic types, and has been deprecated in this release along with those topic types. Instead, use other topic types together with PTDiffusionValueStream.

Build: Publish non-uber client jar to maven (14007)

The diffusion client is now published without its dependencies. The dependency-included version is now named "diffusion-client-with-dependencies"

Build: Support command line arguments to diffusion-docker (16969)

The diffusion docker image now supports command line arguments on starting.

C Client: WebSocket support for compress encoding (13542)

WebSocket connections made with the C API now support receipt and transparent decompression of compressed messages from the server.

C Client: New AUTHORIZATION unsubscribe reason (14837)

A new unsubscribe reason has been added. A callback installed by notify_unsubscription_register() may now receive UNSUBSCRIPTION_REASON_AUTHORIZATION if the permissions for the client have been changed such that it is no longer permitted to subscribe to the topic.

C Client: Remove session_start (16753)

The deprecated function session_start has been removed.

C Client: Update C client to Visual Studio 2015 (17520)

The C client now requires the Visual Studio 2015 tool chain or later. VS 2013 is no longer supported. All of the dependencies have been rebuilt with Visual Studio 2015.

Client: Removal of deprecated items (15728)

Legacy topic types deprecated in earlier releases have been removed in this release. In addition, other deprecated interfaces and methods have also been removed from the API.

Client: '!' can now be used in topic paths (15857)

Topic paths containing the '!' character can now be created through the API. There are now no restrictions on the characters that can be used topic paths. A topic path is a '/' separated string of parts. Each part is formed of one or more UTF characters, except '/'.

Client: Add type conversion interfaces to DataType (15920)

DataType.readAs(...) and canReadAs(...) methods have been added to the DataType API. These provide simple type conversion to compatible types. For example, the StringDataType data type encodes strings using CBOR, so can provide a JSON representation.

Client: Deprecation of Update objects (16159)

As Record and Single value topics have been deprecated at this release then the Update objects that could be used to update them via the TopicUpdateControl feature have also been deprecated along with UpdateFactory.

Client: Deprecate single value topics (16160)

Single value topics have been deprecated in favour of new typed topics. They will be removed in a future release.

Client: New TopicSpecification properties supported (16220)

It is now possible to create any type of topic (except the deprecated Record and Single Value types) using a TopicSpecification and to this end two new properties have been added. These are TIDY_ON_UNSUBSCRIBE (for use with any topic type) and SLAVE_MASTER_TOPIC (for use with slave topics only).

Client: Deprecate unused ClientSummary.ClientType / TransportTypes (16499)

Several ClientType and TransportTypes that were used by classic clients in previous versions of the product have been deprecated.

Client: Registration of control client handlers normalizes and validates paths (16564)

Registration of path scoped control client handlers, including message handlers and topic updaters, now normalizes and validates the supplied path. Invalid paths are rejected. Each path must be a '/' separated string of parts, where each part is formed of one or more UTF characters, except '/'. Before a path is validated, it is normalized by stripping any leading or trailing '/'. Previously, such paths were silently accepted, resulting in configurations that did not behave as expected.

Client: ClientControl operations that address a single session now fail if the session does not exist (16801)

The ClientControl close, setConflated, and setThrottled methods now fail if there is no session with the given session id. In previous releases, these methods completed successfully. In this release, the callback-based methods will receive an onError callback with ErrorReason.NO_SUCH_SESSION as the reason and the CompletableFuture-based methods will complete exceptionally with NoSuchSessionException.

Client: Headers on SendOptions deprecated (16936)

The use of headers within the options when sending a message using the messaging or messaging control features has been deprecated. Headers within messages will be removed at a future release and it is recommended that any such header information is incorporated into the message body.

Client: EXCEEDED_LICENSE_LIMIT response from server when licensed topic limit reached (17221)

The server will respond to a client add topic request with an add topic fail reason EXCEEDED_LICENSE_LIMIT when the topic being added breaches the topic limit imposed by the license. Previous client versions will interpret this reason as UNEXPECTED_ERROR.

Client: Deprecate TopicControl addTopic methods (17435)

Methods in the TopicControl feature that cater for adding topics using TopicDetails have been deprecated as they are only necessary for deprecated topic types. Also, any methods that allow for adding an initial value when adding a topic have also been deprecated as this capability is only required for deprecated topics.

Client: Deprecate Topics.getTopicDetails (17436)

The getTopicDetails method in the Topics feature has been deprecated as TopicDetails are only useful in the context of deprecated topics. Information about other topics can be obtained using the new TopicNotifications feature.

Configuration: New command-line tool to obfuscate configuration strings (17553)

A command line tool has been added to obfuscate configuration strings. This can be found in the bin directory of the product installation (obfuscate.sh / obfuscate.bin). In previous releases, obfuscation was a feature of the Introspector tool (removed in 6.0).

Configuration: Default value of <keep-alive> in Connectors.xml changed (17685)

Changed default value of <reconnect>/<keep-alive> in default connector from 0 to 5 min. This change enables reconnection by default. Keep-alive time depends on and should be at least twice the system ping time.

Console: Enable message rate statistics by default in the console (14580)

Message rate statistics are now graphically visible in the Diffusion console. Overall inbound and outbound message count, as well as overall inbound and outbound message bytes are displayed.

Console: Login dialog takes keyboard focus and allows browser autocomplete (17572)

The modal login dialog has been improved so that the keyboard focus is drawn to the 'User' field, and the form is autocompleted if possible.

Demos: Drawing Board demo updated (17019)

A new Drawing Board demo has been released which uses time series topics with a JSON event type. Improvements over the previous version include a significantly larger colour palette and a new rainbow tool.

Java & Android Client: Replace IllegalArgumentException with NullPointerException for null parameters (11791)

API methods throw NullPointerException when a null value is provided for a non-optional parameter. In previous releases, IllegalArgumentException was thrown.

Java & Android Client: Streams, handlers, and callbacks should behave consistently when a session is closed (15356)

The behavior of the following handlers has changed. If one of these handlers is registered when the session is closed, it will be notified through the onError() callback with the error reason ErrorReason.SESSION_CLOSED. In previous releases, onClose() was called. - ClientControl.SessionPropertiesListener - TopicControl.TopicEventListener - TopicUpdateControl.UpdateSource - The TopicTreeHandler passed to TopicControl.removeTopicsWithSession() This aligns these handlers with callbacks and the CompletableFuture-based methods added in 6.0. A number of handler APIs are based on the older versions of the ServerHandler and TopicTreeHandler interfaces in the com.pushtechnology.diffusion.client.features package. These older interfaces do not have an onError method, and session closure will continue to be reported through the onClose() method. - AuthenticationControl.ControlAuthenticationHandler - ClientControl.QueueEventHandler - MessagingControl.MessageHandler - SubscriptionControl.RoutingSubscriptonRequest.Handler - Topics.FetchStream - TopicControl.MissingTopicHandler Each of the handlers has a CompletableFuture equivalent that provides better error reporting and should be preferred.

Java & Android Client: Avoid notifying RECOVERING_RECONNECT if recovery is disabled (15566)

If a client is configured with reconnection disabled (noReconnection), then its state will transition from CONNECTED_ACTIVE -> CLOSED_FAILED when the connection is lost.

Java & Android Client: Java 8 (15624)

A Java 8 JRE is now a minimal requirement for Java clients.

Java & Android Client: Primitive data types (15855)

String, int64, and double data type implementations have been added, in addition to the existing JSON and Binary types. The new data types back the corresponding string, int64, and double topic types; can be used as the event value type for time series topics; and can also be used by the request/response messaging introduced in this release.

Java & Android Client: Messaging.getStreamsForTopic() is deprecated (16063)

Messaging.getStreamsForTopic() is deprecated and will be removed in a future release.

Java & Android Client: Add DataType.toBytes(), DeltaType.toBytes(), DeltaType.readDelta(Bytes) (16317)

A DataType.toBytes() method has been added to complement readValue(Bytes). Some implementations can efficiently convert a value to a Bytes, avoiding the copying required by the write(byte[]) method. For example, the Binary and JSON data types simply return the value. Similar methods have been added to the DeltaType interface: DeltaType.toBytes() and Delta.readDelta(Bytes).

Java & Android Client: Remove wildcards from DataTypes.getByClass() and DataType.deltaType() generic parameters (16376)

The wildcard qualifiers of the generic parameters of the DataTypes.getByClass() and DataType.deltaType() methods served no purpose and have been removed.

Java & Android Client: Session.feature() no longer checks whether the session is closed (16631)

The Session.feature() API no longer throws SessionClosedException if the session is closed. Checking for session closure is deferred to individual operations.

Java & Android Client: Changes to update cacheing (16743)

There is no longer a single update cache that is used for all updaters. Each exclusive updater now maintains its own cache. The non-exclusive updater no longer uses a cache and the cache accessor methods on TopicUpdateControl no longer have any effect and have been deprecated.

Java & Android Client: API methods no longer throw SessionClosedException (16785)

In previous releases, each API method threw SessionClosedException if the session was known to be closed on entry, and via its callback parameter if the session was closed during the operation. Now each method only reports session closure via its callback parameter. This change simplifies the API by removing the need for applications to handle SessionClosedException as well as handling asynchronous notifications via callbacks. The CompletableFuture variants introduced in 6.0 report session closure by returning a CompletableFuture that will complete exceptionally with a SessionClosedException.

Java & Android Client: No constraint on maximum message size of inbound messages by default (16858)

The default maximum message size has been changed to Integer.MAX_VALUE, so the inbound message size is effectively unlimited. Applications can be modified to restore the previous limit by modifying the appropriate SessionFactory: sessionFactory = sessionFactory.maximumMessageSize(32768);

Java & Android Client: TopicStream is deprecated (17727)

The TopicStream interface is only necessary to support the stateless and record topic types, and has been deprecated in this release along with those topic types. Instead, use other topic types together with ValueStream.

Java & Android Client: TopicDetails is deprecated (17729)

The TopicDetails interface is only necessary to support the stateless, single value, and record topic types, and has been deprecated in this release along with those topic types.

JavaScript Client: Add close method to ClientControl feature (11765)

The JavaScript client now provides a 'close' method through the ClientControl feature. This allows control clients to close other sessions.

JavaScript Client: Authentication control feature (11766)

The JavaScript client now provides the ability to set Authentication Handlers via session.security#setAuthenticationHandler. This is equivalent to the AuthenticationControl feature available in the Java client.

JavaScript Client: WebSocket support for compress encoding (13539)

WebSocket connections made with the JavaScript API now support receipt and transparent decompression of compressed messages from the server.

JavaScript Client: Provide ANONYMOUS principal constant for JavaScript client (16516)

The JavaScript client now exposes a constant value that is used if no principal has been associated with a session. This constant is exposed via 'diffusion.clients.ANONYMOUS'

JavaScript Client: Optional maximum message size for inbound messages (16860)

It is now possible to specify a maximum message size that the JavaScript client will accept. Any messages received that exceed this size will cause the client to be closed.

JavaScript Client: Create topics of appropriate type from primitive values (17265)

Session.topics#add will now produce either String or Double topics if supplied with a primitive initial value. This is a breaking change from pre-6.0 behaviour, where supplying a primitive value would produce a SINGLE_VALUE topic, which is now deprecated.

JavaScript Client: WebPack support (17296)

The JavaScript Node package now supports bundling via WebPack without the need for additional configuration. This makes it easier to use with frameworks such as Angular.

JavaScript Client: TopicDetails is deprecated (17732)

The TopicDetails interface is only necessary to support the stateless, single value, and record topic types, and has been deprecated in this release along with those topic types.

JavaScript Client: TopicStream is deprecated (17745)

The TopicStream interface is only necessary to support the stateless and record topic types, and has been deprecated in this release along with those topic types. Instead, use other topic types together with ValueStream.

JavaScript Client: Rename TypedSubscription to ValueStream to better reflect behaviour (17818)

The TypedSubscription type has been renamed to ValueStream to be more consistent with the other APIs and documentation. The methods and behaviour are still the same and in JavaScript it is entirely a change to how the type is documented. In TypeScript ValueStream has been added and TypedSubscription is a type alias for it. TypedSubscription is deprecated and will be removed in the future.

Licensing: Add CPU core field requirement to the license (16880)

The licence now enforces the number of CPU cores reported by the JVM. Diffusion will not start if JVM CPU cores exceeding the number of CPU cores specified in the licence.

Licensing: Topic tree size restriction added to license (17061)

The license now imposes the limit on the number of topics can be added to the server. A client request to add a new topic that breaches licence limit will receive the new add topic fail reason EXCEEDED_LICENCE_LIMIT. Clients from previous releases interpret the new reason as UNEXPECTED_ERROR.

Licensing: Replication and Fan-out licensing (17347)

Replication and fan-out features now require a Distribution license type. The server running with restricted license will reject the fan-out connections. The server will not start if replication is configured and enabled.

Logging: Log preamble to declare the server's local timezone (16919)

Diffusion server log files will now state the server's local timezone ID in the starting log line. For example, 'BST'.

Logging: Refined log severity levels (17101)

Server-shutdown logging used to include a number of log entries that were incorrectly flagged as warnings. Log designations: PUSH-000169, PUSH-000161 and PUSH-000154 have been demoted from WARN to INFO. Log designations: PUSH-000381, PUSH-000233, PUSH-000256, PUSH-000560 and PUSH-000559 have been demoted from INFO to DEBUG. Messages PUSH-000242, PUSH-000242 and PUSH-000272 have been consolidated.

Logging: The packaged version of Log4j 2 has been upgraded (17331)

The packaged version of Log4j has been upgraded to 2.8.2.

Monitoring: New server-wide statistics (17123)

New statistics are available, providing a server-wide count of important metrics. The new statistics are available through MBeans as: server.client_subscriptions server.inbound.messages server.inbound.bytes server.outbound.messages server.outbound.bytes The equivalent statistics for Prometheus are: diffusion_server_client_subscriptions diffusion_server_inbound_messages diffusion_server_inbound_bytes diffusion_server_outbound_messages diffusion_server_outbound_bytes

Protocol: Support for the DPT and HTTP duplex protocols has been removed (15892)

The DPT and HTTP duplex protocols have been removed from the server and the Java client API. These protocols were deprecated in Diffusion 5.7 and only accessible using the Java client API, and through classic clients.

Publisher API: Acknowledgement API and configuration is deprecated (17089)

Acknowledgements were part of the Classic API and have been removed from the product. The Publisher API methods and configuration settings which control acknowledgements now have no effect, and are deprecated.

Publisher API: The MessageFilter API has been removed (17535)

The following methods have been removed from com.pushtechnology.diffusion.api.publisher.Client. void addQueueMessageFilter(String topicSelectorExpression, MessageFilter filter); boolean removeQueueMessageFilter(MessageFilter filter); The MessageFilter interface has also been removed.

Replication: Topic event listeners may now receive onNoSubscribers notifications for replicated topics (15729)

In previous releases topic event listeners would not receive onNoSubscribers for replicated topics. Topic event listeners may now receive onNoSubscribers notifications for replicated topics. These events are local to the server the listener is registered on. An event listener may receive onNoSubscribers if there are subscribers on different servers.

Replication: Replication support for slave topics (16507)

Slave topics are now replicated between Diffusion servers in a cluster when topic replication is enabled.

Replication: Deprecate the enabled attribute on root element of Replication.xml (16982)

The enabled attribute on the replication element of the Replication.xml configuration file has been deprecated. The related methods for the ReplicationConfig interface have also been deprecated. The attribute has been made optional and defaults to true. The attribute continues to control whether replication is enabled. Replication can be controlled by the individual settings for session and topic replication.

Replication: Replication configuration consistency is now enforced (17126)

From this release, two configuration integrity checks are enforced: - If replication is enabled, the configured server name must be unique for each server in the cluster. - If topic replication is enabled, the topic replication configuration must be identical for each member of the cluster. Both requirements are checked when a server first attempts to join a cluster. If a check fails, the server will shut down.

Security: Security.store: "path" is now a preferred alias for "topic" (10936)

The security store language allows some permissions to be assigned to paths. Depending on the permission, the path may be interpreted as a topic path or a message path (for example, for the SEND_TO_SESSION topic). To better reflect this, the security store language now supports "path" as an alias for "topic" keyword, and "path" is now preferred and used throughout the documentation. For example: set "CLIENT_CONTROL" default topic permissions [SEND_TO_SESSION] and set "CLIENT_CONTROL" default path permissions [SEND_TO_SESSION] are now equivalent statements.

Security: Security store normalizes and validates paths (16563)

The security store now rejects invalid paths in path assignments. Each path must be a '/' separated string of parts, where each part is formed of one or more UTF characters, except '/'. Before a path is validated, it is normalized by striping any leading or trailing '/'. Previously such paths were silently accepted, whether read from the Security.store file or received from a session using the SecurityControl API, resulting in configurations that did not behave as expected.

Server: Tuning parameters now configurable in diffusion.sh (16614)

diffusion.sh now allows for enabling/disabling a specific configuration by uncommenting/commenting the line with it. Default configuration is suitable for local development. Changing it should be justified on a case by case basis, and should be tested with an expected workload before being applied to the production environment.

Server: Support diffusion running in kubernetes (16967)

Support has been added to diffusion clustering in order to determine membership from a kubernetes environment. Various other changes have been implemented to allow diffusion docker containers to work reliably in a kubernetes environment.

Server: Support property based configuration (16968)

Diffusion configuration elements can now be set through command line properties. Properties beginning with the namespace "diffusion" are mapped into the Diffusion Config hierarchy with names mapped to camel-case setters and getters. Thus "diffusion.server.logging.async-logging=true" will call ServerConfig.getLogging().setAsyncLogging(true). The server element can be omitted for brevity. For config elements that return a collection the element to be addressed can either be named or used anonymously in which case the first is used. So for example "diffusion.fan-out.connection.link.selector=*.*//" or "diffusion.fan-out.connection[default].link[default].selector=*.*//". Names may be delimited by any type of brace.

Server: Support prometheus endpoint metrics (17088)

Diffusion can now provide server metrics to the Prometheus monitoring solution.

Server: License kubernetes (17211)

Kubernetes can be enabled or disabled through ReplicationConfig.setKubernetesEnabled(). Actual operation is controlled via the license file. Additional configuration under the direction of Push support is possible through ReplicationConfig.setCustomConfigurator().

Server: Support new fixed session properties (17308)

The server now supports the built-in session properties ClientIP, Latitude, Longitude and StartTime.

Server: Controlled shutdown on SIGTERM (17311)

The server now reponds in a controlled way to SIGTERM such that a managed shutdown is provoked. This provides better support for environments that use SIGTERM to cleanly shut down processes.

Server: Diffusion feature packs (17403)

Some advanced features are now limited to licenses with additional feature packs. Persistence, fan-out and replication are limited to the Availability & Scale pack. Kubernetes and Prometheus support are limited to the additional Auto-Scale pack, which requires the Availability & Scale pack.

Topics: New DONT_RETAIN_VALUE topic property (15216)

Binary, JSON, int64, string, double, time series, and recordV2 topics support a new DONT_RETAIN_VALUE topic property. Setting this property to "true" allows the topic to behave like a stateless topic, while retaining other properties such as its data type.

Topics: Deprecated topic types removed (15579)

The following deprecated topic types have been removed: CHILD_LIST, CUSTOM, PAGED_RECORD, PAGED_STRING, PROTOCOL_BUFFER, SERVICE, TOPIC_NOTIFY

Topics: Record topics deprecated (16161)

Record topics have been deprecated at this release and will be removed in a future release. Consider using JSON topics or the new recordV2 topic type which preserves data format compatibility with the deprecated record topic type.

Topics: The stateless topic type is deprecated (17667)

The stateless topic type has been deprecated. Instead use a binary, JSON, int64, string, double, time series, or recordV2 topic in conjunction with the DONT_RETAIN_VALUE topic property.

Bugs cleared at release 6.0.0

.NET Client: IJSONDataType.FromJSONString() is accepting invalid JSON. (14305)

A JSON string with incomplete objects or arrays was still accepted as valid JSON when passed to IJSONDataType.FromJSONString(). This has now been corrected. As a result, previously accepted JSON strings could now fail if they are syntactically incorrect. If this is the case, please make sure your JSON string is valid according to the standard. Previously valid JSON strings will still work as intended.

.NET Client: Reconnection failure/timeout should set CLOSE_FAILED. (14826)

A failure in reconnection would previously change the session state to CLOSED_BY_SERVER. However, this state is incorrect, as it is the client which is closing itself due to a failure (timeout or other failure). Now a failure to reconnect will report CLOSE_FAILED instead. Please make sure you account for these changes in your session-state handler.

.NET Client: GC.Collect() called upon connection and disconnection (15660)

For every connection and disconnection attempt, the API would trigger the Garbage Collector. This issue has now been rectified.

.NET Client: OnClose being called for registered handlers and listeners upon entering Reconnection (16119)

From v5.8, the expected behavior is that conversations are kept upon entering reconnection and only discarded upon session close. This issue resulted in the server and the client having a contradictory view of the states of the session and its listener and handlers. This issue has now been resolved.

.NET Client: Notify the server when handlers are removed because they threw an exception (16182)

Handlers registered with the server are closed if their callback methods throw an exception. When this happens, they will not continue to receive notifications from the server. However, previously the server would continue to attempt to send notifications to the handler. The server is now informed of the handler closing, and stops sending notifications to it.

.NET Client: Setting the max-message-size for a session overrides the max-message-size for all connected sessions (16526)

Previously, setting the max-message-size for a session would override the max-message-size for all connected sessions. This behavior has been fixed, and each session can now have a different max-message-size defined.

.NET Client: Wrong exception thrown on custom topic selector implementations (17773)

If the topic selector implementation did not use the Diffusion API, an ArgumentNullException or a NulLReferenceException was thrown instead of the expected ArgumentException. This has now been fixed.

Apple Client: All topic update failures are reported as IncompatibleUpdate (17117)

All topic update failures where being reported as IncompatibleUpdate. This was because of incorrect deserialisation of the failure reason. The serialisation has been fixed and an accurate failure reason is returned by the API.

C Client: Session properties listener not working with the C API (16920)

The Diffusion C SDK failed to correctly deserialize session property events. This has been corrected.

C Client: Topic paths starting '@' cannot be subscribed to (17775)

5.9 C clients could not subscribe to topics starting with '@'. This has now been resolved.

Client: Delta updates can be applied to record topics using a non-exclusive updater (15829)

It is possible to create an 'apply' type update (e.g. using Java ContentUpdateFactory.apply) and use it to apply an update to a record topic via a non-exclusive updater. Non-exclusive updaters should not allow delta style updating as it could lead to data corruption. This has now been changed so that an INCOMPATIBLE_UPDATE response is returned if this is attempted.

Client: Session properties events can be received before the registration callback (16512)

Session properties events may be received by listeners before the registration callback. This happened due to the race between activating the listener and sending the initial events to it. The race has been fixed and the registration callback should be notified first.

Client: Duplicate DISCONNECTED events received by SessionPropertiesListener (16799)

The SessionPropertiesListener could receive duplicate session DISCONNECTED event notifications. This could happen if the disconnection was detected in two different ways. The second disconnection is now being filtered. Only a single DISCONNECTED event will be dispatched to the listener.

Console: Panels containing CPU Percentage values don't render well (17574)

There was an issue preventing panels in the Real Time Metrics console from rendering correctly when displayed with the 'CPU Percentage' format. This has been resolved.

Documentation: Java examples on github depend on org.json which is not specified in pom.xml (16492)

The pom.xml has been updated to include the org.json dependency.

Java & Android Client: Calling session.close when disconnected and attempting reconnection (15870)

Fixed an issue where the connection would not enter the closed state when closing a session while reconnecting.

Java & Android Client: DataType write operations should not close the output stream (15896)

Addresses an issue where writing a value to an output stream (using DataType.writeValue(...) or DeltaType.writeDelta(...)) closes the output stream after the operation has completed. This has now been corrected to no longer close the output stream.

Java & Android Client: CompositeControlAuthenticationHandler may not notify all delegate handlers (16188)

Exceptions thrown from the delegate methods of the CompositeControlAuthenticationHandler can interfere with calls to other delegates. The exception handling has been improved to ensure that the delegates receive appropriate invocations. An exception thrown by onOpen of a delegate will further delegates from being notified of onOpen and all delegates will be notified of onClose. An exception thrown by authenticate will cause the authentication attempt to be denied. The first exception thrown by onClose of a delegate will be propagated after all remaining delegates have been notified of onClose.

Java & Android Client: Handler continues to receive notifications after exception causes closure (16189)

Handlers registered with the server are closed if their callback methods throw an exception. When this happens they will not continue to receive notifications from the server. However, previously the server would continue to attempt to send notifications to the handler. The server is now informed of the handler closing and stops sending notifications to it.

Java & Android Client: Possible NullPointerException on session connection (16280)

There is a race condition during session connection. If a session receives a message after the connection handshake, but before the session has been initialised, a NullPointerException can be generated. This has been fixed by keeping any inbound messages queued until after the session has been initialised.

Java & Android Client: IllegalStateException on subscription notification after fail over (16544)

On the client side, an IllegalStateException may be thrown when subscription notifications are received after fail over. This prevents the subscription notifications being passed to any streams that register them. The issue was caused by a race between the clean up of state from the previous connection and the new state received after fail over. It has been fixed by ensuring the state of the previous connection is cleaned up before any new state can be received.

Java & Android Client: NullPointerException thrown when reconnecting twice in a short time (16916)

A NullPointerException was thrown if the session reconnects to the server twice in a short space of time. This is caused by multiple reconnection time outs being scheduled at the same time. If has been fixed by preventing recovery attempts from interleaving.

Java & Android Client: Possible JVM crash when an unchecked exception is thrown in a callback (16950)

Addresses an issue where a JVM crash may occur if an unchecked exception, with a null message, is thrown in a callback method.

JavaScript Client: Upgrade Hashmap dependency in JavaScript Client (16046)

The Hashmap dependency has been upgraded to fix an issue when minifying source code with UglifyJS.

JavaScript Client: Javascript client disconnects immediately when system ping is disabled (16533)

The JavaScript client did not correctly handle a connector that had the system ping disabled. This resulted in the client disconnecting. The JavaScript client now detects the connector configuration correctly and remains connected.

JavaScript Client: Failure to subscribe to a topic is not reported (17429)

In some cases, it is possible for a subscription request to be rejected by the server. For example, this can happen if the user does not have permission to select a topic. When an error happens on subscription it is expected that this is reported through the API. This was not happening for the JavaScript client. Now Subscriptions and TypedSubscriptions will generate a terminal error event if the subscription request they are registered with fails.

Logging: Server log should record clearer information about missed pings (17059)

Increases the logging information when a client is disconnected due to CLIENT_UNRESPONSIVE close reason.

Replication: Session replication recreates topic selections inefficiently, leading to large memory footprint after recovery (16744)

The recovered topic selections were not interned in memory following recovery after failing over. This would cause sessions that failed over from another server to have an increased memory footprint. The topic selections are now interned, reducing the memory used.

Server: Update sources might stop changing state if notifying a session of state change fails (16383)

If notifying a session of a state change failed an update source could have failed to respond to the registration and unregistration of other update sources. Defensive code has been added to ensure that the update sources remain in a consistent state if notifying a session or the cluster of a state change results in an exception being thrown.

Server: NullPointerException when processing a request for a disconnected client (16536)

A NullPointerException is no longer thrown.

Server: Intermittent PUSH-000229 messages in logs (16712)

On rare occasions, when a Java client's session disconnects, the server logged a PUSH-000229 message with an IllegalStateException. This has now been resolved.

Server: Polling client should survive HTTP requests that close the connection (16767)

The polling client has been improved to support load balancers that close every HTTP request.

Server: The UpdateContext for single value and stateless topic updates has been corrected (17007)

In previous releases, the UpdateType provided by the UpdateContext parameter of TopicStream.onTopicUpdate() was incorrect for single value and stateless topic updates. This has been corrected in this release. The UpdateType is now SNAPSHOT by default. The UpdateType will only be DELTA if the ContentUpdateFactory.apply() method is used to create an Update instance. Applications should prefer the higher level ValueStream API over TopicStream, and need only use ContentUpdateFactory to update record topics.

Server: NullPointerException logging large messages (17378)

A NullPointerException could happen after logging a very large message. This happened because of the incorrect management of a thread local buffer.

Server: Responses with the diffusion-connection:reconnect header are missing the Access-Control headers (17469)

CORS origin response headers were missing from responses to unknown clients. This could prevent clients using the HTTP polling transport from recovering by preventing further HTTP requests. The correct headers are now included.

Server: HTTP based transports may repeatedly loose connection (17485)

HTTP based transports that send messages to a server that thinks they have disconnected may be forced to reconnect repeatedly. When a message was received by the server from a client that it had placed into a recovering state it would respond with an OK response. This would make the client think the message had been received correctly. The server would then expect to receive the message again on recovery. Instead the server would disconnect the client again. Now when a message is received by the server from a client that it had placed into a recovering state it will respond indicating that the session is not connected.

Server: Server rejects WebSocket connection attempts that fail to complete within the connection timeout (17529)

The server-side connection timeout was not correctly applied to WebSocket connection attempts. This has been fixed.

Web Server/HTTP: HTTP requests using the chunked transfer-encoding are not handled correctly by the server (8910)

Several bugs were fixed with the parsing of chunk-encoded requests. The previous implementation treated any transfer-encoding header as chunked encoding, among other issues.

Known Issues

.NET Client: IContent cannot be used in IValueStream<T> (17811)

IContent cannot be used as a valid type for a IValueStream<T>.

C Client: WebSocket session open cannot be called concurrently (17787)

Due to an underlying issue in the libwebsockets library it is not possible to create concurrent sessions over WebSockets. This will be resolved in a future release.

Client: New user defined properties are not reported to Session Properties Listeners (19540)

The documentation for session properties listeners says that when there is a session event, the 'previous values' map will contain an entry with a null value for any new property. This does not occur - there will be no entries in the previous values map for new properties. This will be resolved in a future release.

Console: The button to the console sometimes does not appear (17772)

The button to the console does not appear on the server dashboard under some circumstances.

Console: Console shows fractional users connected. (17777)

The concurrent clients and client connections graphs on the console can display fractional users.

Console: Logging into console with non-admin credentials provokes errors (19859)

Logging into the Diffusion Console with valid credentials for a principal which lacks the required permissions will output errors on the JavaScript console, and displays empty tabs instead of a useful UI.

Java & Android Client: Record Topics do not notify current value to TopicStreams (14119)

There is a known issue with the legacy record topic type. If the Topics feature is used to add a new TopicStream which covers record topics that are already subscribed to, the stream will be notified of subscription to the topic but will not be given the latest value for the topic and will be unable to process subsequent deltas. For this reason, when using record topics, it is important to add the stream that will process the topics is added before the topics are subscribed to. This does not apply to the new recordV2 topic type. If possible, you should use the recordV2 topic type, not the legacy record topic type, which is deprecated.

Replication: Routing topic handlers cannot reliably create replicated topics on demand (17038)

In a deployment without topic replication, a routing topic handler can handle a routing request by creating a topic on demand and responding with its path. Such a strategy is unreliable with topic replication. If a routing topic handler creates a replicated topic, the topic may not be created on the server managing the routing subscription before the routing subscription is evaluated, leaving the session unsubscribed.

Security: Inadequate permission check when creating slave topics (18714)

A session can create a slave topic that refers to a master topic for which the session does not have READ_TOPIC permission. A session can therefore create a slave topic to abuse this and bypass READ_TOPIC permission checks.