Diffusion 5.9 Release Notes

5.9.4 (6 Feb 2017)

Bugs Cleared at release 5.9.4

Cloud: session ErrorHandler onError called spuriously after client close (15916)

Addresses an issue where a session's error handler may be called before the session closes, due to an incoming delta message from a subscription.

Console: Console memory parser does not support scientific notation (16230)

Charts on the console now continue to work with large numbers represented by scientific notation.

Distribution: Fan-out issues on reconnection (16304)

There were some issues with fan-out reconnections, especially when a link included a very large number of topics. A disconnection whilst the link was being established could result in the link being in the wrong state after reconnection which could result in non replication of topics. These problems have now been resolved.

Distribution: Fanout schedule connect attempt logging should be in milliseconds (16307)

PUSH-000538 log message indicated that a fan-out connection would retry in a number of seconds when it should have read milliseconds - this has now been corrected.

Documentation: JavaScript API Docs refer to session.topics.TopicType which doesn't exist (16239)

The JavaScript documentation has been improved to link correctly to session.topics.TopicType

Documentation: Correct interoperability statements in the manual (16323)

The Interoperability page in the manual stated that 5.1 Unified clients are supported against 5.7 and later servers. This is not the case.

Monitoring: Race condition between starting and stopping topic instance statistics (16209)

A race condition was found when removing and adding back a topic with the same path when topic instance statistics were enabled. The topic instance metrics were added before being removed. The race condition has been fixed.

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

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: JSON and Binary topics publish a delta when it would be cheaper to publish the new value (16252)

JSON and Binary topics now reliably publish a new value rather than a delta update if the serialized form of the new value is smaller than the delta.

Unified API (.NET): Incorrect JSON parsing (16362)

Fixed an issue when a numeric string is used as a key in a JSON string.

Unified API (Apple): Use DISPATCH_CURRENT_QUEUE_LABEL instead of dispatch_get_current_queue() for logging (16356)

Fixes the potential for a crash when runtime logging had been enabled and the name of the current dispatch queue formed part of the logged output. Runtime logging should not be enabled for production app builds, so this bug will have only been encountered during development.

Unified API (C): No topic selector type should be treated the same as "Path" (>) (16289)

When using topic selectors, a missing selector type is now correctly treated as a full path selector (">").

Unified API (Java): Possible NullPointerException on session connection (16210)

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

5.9.3 (11 Jan 2017)

Functional Changes made at release 5.9.3

Product Release: Distribute unminified JavaScript client source (16057)

The unminified JavaScript source is now distributed along with the minified source.

Server: MetadataCodec - pool JAXB objects in a thread local. (16027)

The performance of XML parsing of record topic data metadata has been improved.

Unified API (Java): RoutingSubscriptionRequest API documentation has been corrected (16036)

The RoutingSubscriptionRequest API documentation has been corrected: If (defer/subscribe) is called twice, IllegalStateException is not thrown. The operation is sent to the server, which will log a warning as the conversation no longer exists and fail the call with a COMMUNICATION_FAILURE reason. The client callback will be discarded.

Bugs Cleared at release 5.9.3

Cloud: Console disconnection when under load (16179)

A memory leak has been fixed which caused console clients to disconnect when many clients connect to the server.

Distribution: Fan-out client does not restart if the fan-out subscription is discarded (16054)

Fanout client will now start a new connection if the fanout link subscription is discarded.

Documentation: Diffusion send message example is not complete (Java) (16101)

Updated the ControlClientReceivingMessages.java example to demonstrate sending a message as Content and JSON. Also now shows how a JSON message can be decoded.

Replication: Session keep-alive time too short for failover in the event of server failure (15775)

In a replicated cluster sessions are removed from the cluster if they do not fail over following the failure of the server they were connected to. Under high load there may not be enough time for all sessions to recover before they are removed. The keep-alive time has been increased by basing it on the greatest keep-alive time defined in the Connectors.xml configuration file.

Replication: UpdateSource transition may not occur when certain exceptions are thrown (16168)

Addresses an issue where an UpdateSource may not transition from STANDBY to ACTIVE (after a previously active UpdateSource has been closed) due to a non-fatal exception being thrown. This has now been resolved.

Server: Routing subscription request caused multiplexer error (IndexOutOfBoundsException) if routed session no longer existed (16012)

If a routing subscription handler responded to a request for a session, and the session had been closed in the meantime, the operation would fail. Further, this stopped a multiplexer threads. Full service could only be restored by restarting the server. This problem has been resolved.

Server: The server polling message channel should remain busy until receive the first poll request (16049)

The polling message channel will now be set to busy until the first poll request is received.

Server: Add Access-Control-Expose-Headers:diffusion-connection to HTTP response (16068)

Added "Access-Control-Expose-Headers:diffusion-connection" header to HTTP response for poll and send.

Server: Multiple license breach errors (16107)

License breach errors are now suppressed and reported in batches.

Server: Server memory leak when a Java session disconnects (16208)

Closing a Java client session could cause a memory leak on the server. The problem has been fixed in this release.

Server: Unnecessary retention of memory by cancelled scheduled operations (16219)

Scheduled time-outs unnecessarily retained memory when cancelled. This affected both the server and the Java client. For example, a closed session would stay in memory on the server until the reconnection time-out matured. From this release, memory is released for garbage collection when operations are cancelled, reducing the overall memory footprint.

Unified API: SessionPropertiesListener does not work over DPT (16113)

An unnecessary protocol restriction prevented the use of SessionPropertiesListener from a session connected using the DPT protocol. This restriction has been removed. Related restrictions have been lifted allowing the following: - TopicControl.remove() over DPT - Missing topic notification propagation over DPT fanout links

Unified API (.NET): OnClose being called for registered handlers and listeners upon entering Reconnection (16121)

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.

Unified API (Android): Notify the server when handlers are removed because they threw an exception (16183)

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 close and stops sending notifications to it.

Unified API (Java): Notify the server when handlers are removed because they threw an exception (15032)

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 close and stops sending notifications to it.

Unified API (Java): A routing subscription handler can subscribe a session to source and routing topics to which it has no access (16037)

Access control checks were not properly applied. This allowed a routing subscription handler to complete a routing subscription even if it did lacked READ_TOPIC permission for both the a session to source and routing topics . This has been corrected.

Unified API (Java): Polling client send request should be processed only when ready (16050)

Fix an issue where polling client was processing pending messages when not ready.

Unified API (Java): CompositeControlAuthenticationHandler may not notify all delegate handlers (16085)

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.

Unified API (Javascript): Upgrade Hashmap dependency in JavaScript Client (16052)

The Hashmap dependency has been upgraded to fix an issue when uglifying source code.

Unified API (Javascript): Missing documentation for custom credentials (16062)

The JavaScript Unified Client did not document that custom credentials could be provided by connection options. This has now been fixed.

Unified API (Javascript): Update values which do not correspond to any metadata or datatype do not cause an INCOMPATIBLE_UPDATE error. (16099)

When updating a topic with a value that does not have a corresponding Metadata or Data Type (i.e an Array), no error is emitted. This has now been resolved, and an UpdateFailReason.INCOMPATIBLE_UPDATE error will now be provided to the failure callback for the update result.

Unified API (Javascript): Calling session.close when disconnected and attempting reconnection (16110)

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

Unified API (Javascript): TypeScript definition improvements (16132)

Improvements have been made to the TypeScript definition.

5.9.2 (2 Dec 2016)

Functional Changes made at release 5.9.2

Console: CSS improvements in the console (15709)

The visual appearance of the console has been improved.

Unified API: Improved delta support for large JSON and Binary values (15537)

The delta calculation performed by the server has been refined to produce smaller deltas when the input values are large.

Unified API: Reduced delta message size for inputs that have many small differences (15545)

The binary difference engine has been optimized to reduce delta sizes for input values that have many small differences.

Unified API (.NET): Session details are deprecated. (15607)

Session details are now deprecated. Use Session properties instead.

Bugs Cleared at release 5.9.2

Adapters: pushnotifications/pn_bridge.bat (15542)

Bugs have been eliminated from the Windows BAT file pushnotifications/pn_bridge.bat

Adapters: PushNotifications : "Unknown template variable 'topic.content'" (15793)

Correcting incorrect template variable 'topic.content' in pushnotifications/PushNotifications.xml

Adapters: Push Notifications: nothing prevents creation of templates with the same name (15830)

Uniqueness of <template> elements is now enforced.

Configuration: Using an absolute path in the <default-log-directory> of the Logs.xml fails (15697)

Using an absolute path in the <default-log-directory> of the Logs.xml would not have the expected behavior, as it would try to append the absolute path to the path used for the Diffusion installation. This issue has now been rectified.

Console: Console panels act oddly with long (but not too long) titles (15171)

Panels in the console previously exhibited odd behavior when resizing the browser window. This has been resolved.

Console: Console topic tree refresh not always working (15590)

The topic tree tab of the console now refreshes after the console client disconnects and reconnects.

Console: Upon enabling client statistics and enabling monitor-instances, inbound and outbound messages do not update on the clients tab (15852)

Inbound and outbound message statistics now correctly update on the clients tab of the console.

Distribution: Fan-out fails when custom max-message-size is configured in Server.xml (15778)

Fan-out failed to modify the max message size to coincide with the value set in the Server.xml. This issue has now been fixed.

Documentation: TopicPermission.READ_TOPIC documentation incorrect (15737)

The API documentation for the READ_TOPIC permission has been corrected. Previously it erroneously stated that it also restricted receipt of messages sent using the Messaging feature. The transmission of messages is only controlled through the SEND_TO_SESSION and SEND_TO_MESSAGE_HANDLER permissions.

Server: Newer HTTP client to older server handshake does not return downgrade response (15604)

Clients connecting over HTTP transports (WebSockets, Long Polling) that were of a higher protocol level than the server they were connecting to would receive an "OK" response instead of a "Downgrade" response. This would permit the client to operate as if it had successfully connected, despite the possibility of compatibility issues. This has now been resolved.

Server: Change the poll hander logging level when a client session is closed (15676)

Diffusion will no longer log a warning when a polling client closes a session. In addition setting the logging level to Error will no longer cause an invalid response from the polling handler.

Server: Missing context when sending a onSessionClose notification with the reason FAILED_OVER (15705)

Fixed an issue where an exception would be thrown when sending an onSessionClose notification with the FAILED_OVER reason to older clients.

Server: Possible NullPointerException in server when updating topics (15831)

There was the possibility that updates could fail in the server if a topic was removed at exactly the same time as an update was being applied - this has been resolved.

Server: Reconnection failures due to incorrect recovery buffer management (15835)

A bug in the management of the server-side recovery buffer could cause reconnection to fail unnecessarily. This problem has been rectified.

Server: Silent failure creating topics with leading slash (15871)

The server will now respond with failure when attempting to add a topic that begins with a leading slash.

Unified API (.NET): GC.Collect() called upon connection and disconnection (15664)

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

Unified API (Apple): Completion handlers and delegates can receive multiple calls on closure (15905)

Fixes an issue where completion handlers and delegates could be incorrectly informed of failure due to the session being closed. This could happen if the session was closed while handling a response from the server.

Unified API (Java): Session wills must always be called in the context of a client (15907)

Under some circumstances session wills could be called with default user credentials. The client context is now appropriately enforced when a will is executed.

Unified API (Javascript): Promise values are undocumented (15682)

Promise Result values are now documented in the JavaScript API documentation.

Unified API (Javascript): Handler "onError" methods are called when a session is closed normally (15687)

The "onError" method for handlers registered in the JS Unified Client was incorrectly called when the registering session was closed. This has now been resolved, and the "onClose" handler method will be invoked instead.

Unified API (Javascript): session.unsubscribe does not return a promise (15689)

session.unsubscribe now correctly returns a promise.

Unified API (Javascript): Use of reserved keyword "implements" in JavaScript client (15727)

The JavaScript client was using a future reserved keyword "implements" that some JavaScript linters objected to. This has now been resolved.

Unified API (Javascript): JS constants 'TopicAddFailReason' and 'UpdateFailReason' are not exported (15748)

The Unified JavaScript client documented 'TopicAddFailReason' and 'UpdateFailReason' enums as error results for topic operations. However, these were not exposed through the Diffusion namespace as implied by the documentation. This has been resolved and the constants are accessible via 'diffusion.topics.TopicAddFailReason' and 'diffusion.topics.UpdateFailReason' respectively.

Unified API (Javascript): JS does not implement the unsubscription authorisation change (15780)

While the Unified JS client had implemented the 'AUTHORIZATION' UnsubscribeReason, the server's internal versioning model had not been updated to reflect this capability. This resulted in the server sending the 'CONTROL' UnsubscribeReason in situations where 'AUTHORIZATION' would have been expected. This has now been resolved.

5.9.1 (19 Oct 2016)

Features introduced at release 5.9.1

Adapters: JMS Adapter "Client Edition" (15219)

The JMS adapter can now run standalone, as a client of Diffusion or Reappt.

Functional Changes made at release 5.9.1

Build: Package JMS control client in clients (15598)

The JMS control client adapter has been packaged so that it is available as a Reappt client in clients/jms. The client is also available on maven central.

Configuration: Deprecate assigned-roles element in Management.xml (15558)

The value for assigned-roles is only used by the users defined in Management.xml. Configuring users is deprecated so assigned-roles has been deprecated.

Distribution: Fan-out: propagate missing topic notifications (15360)

When using fan-out, missing topic notifications generated by subscription and fetch operations against a secondary server are now propagated to the relevant primary servers.

Eclipse Tools: Deprecate the Introspector/Eclipse plugin (15473)

This feature is marked deprecated, and will be removed in a future release.

Unified API (Apple): New AUTHORIZATION unsubscribe reason (14839)

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

Unified API (Javascript): Accept port as a string (15476)

In the JS Unified Client, the "port" connection option now correctly handles and validates values provided as strings.

Bugs Cleared at release 5.9.1

Configuration: Deprecation warning about acceptors in Connectors.xml when not present (15441)

Warnings about the use of the deprecated element acceptors in Connectors.xml are reported in the log when the element is not present. The warning was caused by the default value when the element was not set. This has been corrected so no warnings are reported when the element is present.

Console: DiffusionPublisher leaks closed introspector and console client sessions (15534)

The DiffusionPublisher was leaking memory. Each Introspector or console session would be kept in memory. These will now be released once the session closes.

Console: Console does not handle Access Denied exceptions gracefully (15569)

The console will now provide error messages instead of silently failing if the session credentials do not have sufficient permissions to perform console actions.

Server: MissingTopicNotification retries - cope with no further handlers (15489)

If a missing topic notification could not be delivered and is retried but there is no longer a registered missing topic handler, a NullPointerException was logged by the server. This has been corrected, and a warning message is now logged.

Server: Client-side timeout in AbstractOutboundHandshake interrupts thread (15595)

Addresses an issue where an InterruptedException is thrown on the server when an inbound client connection times out during connection.

Unified API: getSessionDetails returns 'unknown session' when there are no details (15471)

The 'get session details' capability of the client control feature in all unified clients would return an 'unknown session' callback if the session existed but had no details to return. This has now been fixed.

Unified API (Apple): Messaging: correct handling of message that matches no streams (15387)

From this release, the implementation has been corrected to match the documented behavior. The client will always reject an inbound message that matches no streams. The server will log the rejection as a COMMUNICATION_FAILURE and report the delivery failure to the MessagingControl sender as a failure.

Unified API (Apple): Linker cannot find PTDiffusionBytes (15448)

The symbols for the PTDiffusionBytes class were not available in the built library binary causing a linker error should an attempt be made to directly allocate an instance of this (base) class.

Unified API (Java): JSON.diff does not handle CBOR fixed length arrays and objects (15556)

When parsing a CBOR binary representation of JSON that contained a fixed length object or array, JSON.diff() could produce an invalid JSONDelta. This problem has been rectified.

Unified API (Javascript): Typescript definition does not support SessionEventTypes (15437)

SessionEventTypes have been added to the TypeScript definition.

Unified API (Javascript): TypeScript definition does not allow instantiation of String metadata (15438)

The Typescript definition now allows String metadata.

Unified API (Javascript): Stream#close not documented (15500)

In the JavaScript Unified Client, Stream#close - which is implemented by Subscription, TypedSubscription, and MessageStream - was not correctly documented. This has now been resolved.

Unified API (Javascript): sessionid.equals() does not tolerate other types (15592)

SessionId.equals() has been modified to allow comparisons with objects that are not SessionId

5.9.0 (29 Sep 2016)

Features introduced at release 5.9.0

Classic API (iOS): Add Bitcode to classic library build (12411)

Explicit support for Bitcode has been added to the classic iOS client.

Client (Java): WebSocket support for compress encoding (13538)

The Java client now supports the transfer of compressed messages over WebSocket connections.

Distribution: Automated Fanout Reconnection (14899)

Automated fan-out now supports reconnection of fan-out connections to primary servers. Previously, if the connection between a secondary server and a primary server was lost the secondary server would remove all replicated topics and re-establish a new connection with the primary server. This is because previously fan-out could not make use of standard reconnection due to the possibility of message loss. Since release 5.8 reconnection without message loss is possible and therefore fan-out has now been changed to make use of this capability. This means that a fan-out secondary server that loses its connection to the primary server can now reconnect without any loss of topics. This is not enabled by default as the connector at the primary server also has to be configured to support reconnection. In order to enable reconnection from a secondary server the new reconnection timeout property must be specified in the fan-out connection configuration.

Distribution: Fan-out support for Routing topics (15070)

Routing topics are now supported by automatic fan-out. When Routing topics are replicated then routing subscription handlers are only necessary at the secondary servers.

Unified API: Automatic creation of intermediate topic nodes no longer creates stateless topics (14955)

Previously when a topic was created with a hierarchic name (for example, a/b/c) then if there was not already a topic at the ancestor nodes (for example, a or a/b) then stateless topics would automatically be created. This meant that where topics were required at several levels of the hierarchy they had to be created in top-down order. This is no longer the case and intermediate nodes that do not already exist will not have topics bound to them. This means that it is now possible to create topic a/b/c and then topic a/b after. This represents a change in behavior in that the intermediate stateless topics are not now created and applications that expected to be able to use them, or expected to become subscribed to them may need to be changed.

Unified API (Apple): JSON and Binary topic type support (14058)

Adds the capability to generate and receive both JSON and Binary values. Support for adding value streams, either for PTDiffusionJSON or PTDiffusionBinary values, has been added to PTDiffusionTopicsFeature. PTDiffusionBytes is the new superclass above PTDiffusionJSON, PTDiffusionBinary and PTDiffusionContent. The PTDiffusionMessagingFeature now sends PTDiffusionBytes rather than PTDiffusionContent. Add topic methods on the PTDiffusionTopicControlFeature now accept initial values as PTDiffusionBytes rather than PTDiffusionContent. Instances of PTDiffusionTopicUpdater obtained from the PTDiffusionTopicUpdateControlFeature now accept PTDiffusionBytes rather than PTDiffusionContent.

Unified API (Apple): Add convenience overload to Topics feature add topic stream to allow supply of string (14313)

New convenience method addTopicStreamWithSelectorExpression:delegate: added to Topics feature that takes NSString* and builds a PTDiffusionTopicSelector* from that.

Unified API (Apple): New TopicControl.remove capability (15044)

New method removeDiscreteWithTopicSelectorExpression:completionHandler: has been added to PTDiffusionTopicControlFeature which will replace removeWithTopicSelectorExpression:completionHandler: (now deprecated). The difference being that it is now possible to remove a topic without removing its descendant topics in the topic tree hierarchy.

Unified API (C): New topic_removal() service (15045)

Added a new service topic_removal() which supersedes remove_topics().

Unified API (C): Allow maximum queue size to be configured for client API (15161)

A new function, session_set_maximum_outbound_queue_size(), has been added to manage the size of the queue used to buffer messages before transmission to the server.

Unified API (Java): Java client support for HTTP Polling transport (13842)

Added polling transport to the Java Unified client. This allows the client to connect and interact with the server using the polling transport. The Unified Java client can now cascade among WebSocket and HTTP Polling transports when a list of transports is passed in as an option.

Unified API (Java): Java client connection cascading (14497)

Clients can perform connection cascading from a list of transports given to the session factory. For example: Diffusion.sessions().transports(WEBSOCKET, HTTP_POLLING). This will instruct the client to connect to the server using WebSockets. If it fails to connect using WebSockets, the client then tries again with HTTP polling. The client will cease cascading if the server returns a fatal error.

Unified API (Java): New TopicControl.remove capability (15041)

New 'remove' methods have been added to TopicControl which will replace the old TopicControl.removeTopics methods (now deprecated). The difference being that it is now possible to remove a topic without removing its descendant topics in the topic tree hierarchy.

Unified API (Java): Allow maximum queue size to be configured for client API (15153)

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

Unified API (Javascript): SubscriptionControl feature (12789)

The JavaScript Unified Client now implements the SubscriptionControl feature, allowing control clients to subscribe or unsubscribe other sessions based on either SessionId or Session Filters. This functionality is accessed under the "session.clients" namespace.

Unified API (Javascript): Provide a TypeScript Definition file (13267)

A TypeScript definition is now available for download and is included in the Node.js client.

Unified API (Javascript): Add ability to specify the HTTP and WebSocket request path (15055)

The JavaScript Unified Client now provides a "path" connection option. This allows users to specify additional URL context for connections, beyond the existing hostname/port options.

Functional Changes made at release 5.9.0

Classic API: Classic client APIs are deprecated (15194)

All Classic APIs for clients are deprecated: Java Classic API, .NET Classic API, Android Classic API, iOS Classic API, JavaScript Classic API, Flex Classic API, Silverlight Classic API. Instead of these Classic APIs use the Unified APIs. The Java Publisher API is not deprecated.

Classic API (Publisher/Server): Topics may no longer be set as non-lockable (15079)

It is no longer possible to set stateless topics as non-lockable. All topics are now lockable and therefore TopicProperty.LOCKABLE no longer has any effect and has been deprecated.

Classic API (Publisher/Server): Deprecate AuthorisationHandler.canSubscribe(Client, Topic) (15197)

AuthorisationHandler.canSubscribe() is deprecated in this release and will be removed in a future release. Prefer Diffusion's declarative role-based security.

Classic API (Publisher/Server): Publisher Server Connections Deprecated (15198)

The ability to automatically connect publishers to other servers via PublisherServerConnections has been deprecated and will be removed at a future release. This was a form of classic client connection and classic clients have also been deprecated at this release. The main use for such connections was for manual fan-out. It is now recommended that the automatic fan-out feature is used instead.

Configuration: Changed default value for the api-type element in the Connectors.xml (15418)

With the deprecation of classic APIs the default value of api-type in the Connectors.xml has been changed from 'classic' to 'all'. This allows both Unified and classic clients to connect to every connector by default.

Configuration: Element users in Managment.xml is optional (15421)

The users element in the Management.xml configuration file was previously deprecated but remained a required element with at least one child user element. This requirement has been removed, the users element is now optional and it does not need to contain any child elements.

Console: Improved console statistics - dropdown to select metrics instead of typing topic path (14765)

It is now possible to select metrics in the console using a dropdown instead of typing out the full topic path.

Misc: Create an example MessageMerger for record topics with variable records/fields (14636)

An example MessageMerger for use in the conflation of record topics with variable records/fields has been added to the Diffusion install and Github examples.

Protocol: The DPT protocol is deprecated (14882)

The DPT protocol is deprecated, and will be removed in a future release. Applications should use the WebSocket protocol instead.

Server: Subscriptions are re-evaluated when a session's assigned roles change (10669)

If a session re-authenticates with Security.changePrincipal(), the assigned roles associated with the session may change. Consequently the session may gain permission or lose permission to subscribe to topics. From this release, a session's topic selections are re-evaluated against the topics for which the session has gained READ_TOPIC permission, and the session will be unsubscribed from topics for which it no longer has READ_TOPIC permission.

Server: The maximum message size can be configured independently of input buffer sizes (11749)

The restriction that the input buffer size configured for any connector is at least as large as the maximum message size has been removed. From this release, the maximum message size can be configured to be larger than the input buffer sizes. This allows the input buffer size to be tuned independently. It is still good to set an input buffer size large enough to handle the majority of inbound messages. If a message larger than the input buffer size arrives, a larger buffer will be allocated and a warning logged.

Server: Improved topic selector cache management (14863)

Improvements to topic selector cache such that tidying occurs on a more regular basis.

Server: Reject unsupported service invocations (14881)

Allows the server and the Java client to detect attempts to invoke unsupported versions for a given client type and protocol version, and respond with an appropriate CommandError.

Server: Improve reliability of missing topic notifications (15001)

Improves the reliability of handling missing topic notifications. Where a common path is registered to multiple missing topic notification handlers, if one fails to handle it, another handler will be attempted.

Topics: Topic notify, paged, child list and custom topics are deprecated (15193)

Paged, topic notify and child list topics have been deprecated as they can only be used within the classic client APIs which have also been deprecated at this release. They will be removed in a future release. Custom topics have also been deprecated as in most cases support for other data types can be better achieved using Binary topics.

Unified API: The unused Session.State.RECOVERING_FAILOVER is deprecated (15119)

The RECOVERING_FAILOVER session state is unused. It is deprecated from this release, and will be removed in a future version of the product.

Unified API: Fallback streams subscription and unsubscription improvements (15271)

In previous releases, a fallback stream was not notified when a new stream was added that selected subscribed topics, when a stream that selected subscribed topics was removed, nor there were existing subscribed topics with no associated streams when the fallback stream was added. This led to inconsistencies. From this release, the client will generate synthetic subscription/unsubscription events for fallback streams. When a new stream is added, all fallback streams will receive an unsubscription for the topics the new stream selects, with the unsubscription reason STREAM_CHANGE. When the last stream applying to a topic is removed, all fallback streams will receive a subscription for the topic. When a fallback stream is added, it will receive subscription notifications for all subscribed topics that have no other associated stream.

Unified API: Relaxed parsing of split path and full path topic selector expressions (15275)

The parsing of split path and full path topic selector expressions has been relaxed a little. A single leading path separator is tolerated and ignored. Previously "?/x" would fail to parse; from this release "?/x" behaves the same as "?x". Previously "*/x" would not match the path "x"; from this release "*/x" behaves the same as "*x" and so matches the path "x". A single trailing path separator is tolerated and ignored. Previously "?x///" would fail to parse; from this release "?x///" behaves the same as "?x//". Previously "*x///" would not match the path "x"; from this release "*x///" behaves the same as "*x//" and so matches the path "x".

Unified API (.NET): New ITopicControl.Remove capability (15043)

New 'Remove' methods have been added to ITopicControl which will replace the old ITopicControl.RemoveTopics methods (now deprecated). The difference being that it is now possible to remove a topic without removing its descendant topics in the topic tree hierarchy.

Unified API (.NET): Provide ErrorReason to identify handlers closed by exceptions in callback methods (15046)

Additional exception handling has been added around handler callbacks. When an exception is thrown by a handler callback method the handler will be closed and a notification passed to the handler's onError callback. The ErrorReason will be code 105, "An application callback threw an exception. Check logs for more information.". The log message ID PUSH-000628 has been added for these exceptions. Any exceptions thrown by the onClose or onError callback methods will be logged but onError will not be notified.

Unified API (.NET): Delegated Topics and IStateProvider removed (15066)

Delegated topics and the associated IStateProvider mechanism in the ITopicControl feature were deprecated at release 5.1. These have now been totally removed from the product.

Unified API (.NET): The deprecated Topics.GetStreamsForTopic() method has been removed (15212)

The Topics.GetStreamsForTopic() method has been removed. It was deprecated in Diffusion 5.7.0.

Unified API (.NET): Pass IBytes instead of IContent for IUpdater.update method in ITopicControl (15252)

The IUpdater.Update method in ITopicControl now takes type IBytes instead of IContent. This means that the method can now be used for topics that have IBytes values (e.g IJSON, IBinary) as well as IContent based values.

Unified API (.NET): Headers removed (15265)

The Headers type was deprecated in release 5.2 in favour of a simple list of Strings. Headers has now been removed.

Unified API (.NET): SUBSCRIPTION_REFRESH reason (15270)

A new TopicUnsubscribeReason has been added to the Topics feature of the Java Unified API. TopicUnsubscribeReason.SUBSCRIPTION_REFRESH indicates the server has re-subscribed a session to the topic. Existing streams are unsubscribed because the topic type and other attributes may have changed. This can happen if a set of servers are configured to use session replication, and the session connected to one server reconnects ("fails over") to a different server.

Unified API (Apple): Deprecate session error handler protocol (15173)

The PTDiffusionSessionErrorHandler protocol has been deprecated, replaced by the error property on the PTDiffusionSessionState class.

Unified API (Apple): Deprecate updater's use of Content and replace with Bytes (15248)

The update methods on PTDiffusionTopicUpdater that took PTDiffusionContent have been deprecated, replaced by new methods that take PTDiffusionBytes. This means that they can now be used for topics with values deriving from PTDiffusionBytes (i.e. JSON, Binary and Content-based).

Unified API (Apple): SUBSCRIPTION_REFRESH reason (15268)

A new value has been added to the PTDiffusionTopicUnsubscriptionReason enumeration. PTDiffusionTopicUnsubscriptionReason_SubscriptionRefresh indicates the server has re-subscribed a session to the topic. Existing streams are unsubscribed because the topic type and other attributes may have changed. This can happen if a set of servers are configured to use session replication, and the session connected to one server reconnects ("fails over") to a different server.

Unified API (C): Propagate ErrorReason to clients (10641)

Service errors now propogate the error reason via the DIFFUSION_ERROR_T structure to the service callbacks, instead of a generic DIFF_ERR_SERVICE code.

Unified API (C): Message loss detection (14441)

Message loss detection and reliable recovery via retransmission of missed messages has been added to the C API, bringing it to feature parity with other APIs.

Unified API (C): Make diffusion headers C++ compatible (14527)

The main header file (diffusion.h) now conditionally declares C linkage to facilitate building with C++ compilers.

Unified API (C): Additional events and information for session properties listener (14711)

Session properties listeners can now detect when sessions have been disconnected and are notified through the on_session_disconnect() callback. A new close reason, SESSION_CLOSE_REASON_FAILED_OVER has also been added.

Unified API (C): SUBSCRIPTION_REFRESH reason (15267)

A new reason code has been added to unsubscription notifications. UNSUBSCRIPTION_REASON_SUBSCRIPTION_REFRESH indicates the server has re-subscribed a session to the topic. Existing streams are unsubscribed because the topic type and other attributes may have changed. This can happen if a set of servers are configured to use session replication, and the session connected to one server reconnects ("fails over") to a different server.

Unified API (Java): Headers removed (10872)

The Headers type was deprecated in release 5.2 in favour of a simple list of Strings. Headers has now been removed.

Unified API (Java): Improved CLOSED_BY_SERVER detection (14389)

An internal protocol change has improved notification to Java and Android Unified API clients that a session has been closed on the server. The client session will transition to CLOSED_BY_SERVER rather than RECOVERING_RECONNECT under more circumstances, avoiding unnecessary reconnection attempts. This protocol change will be included in the other client libraries in a future release.

Unified API (Java): New AUTHORIZATION unsubscribe reason (14836)

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.

Unified API (Java): TopicControl.Updater.update takes Bytes instead of Content (14958)

The Updater.update method in TopicControl now takes type Bytes instead of Content. This means that the method can now be used for topics that have Bytes values (e.g JSON, Binary) as well as Content based values.

Unified API (Java): Delegated Topics and StateProvider removed (15040)

Delegated topics and the associated StateProvider mechanism in the TopicControl feature were deprecated at release 5.1. These have now been removed from the product.

Unified API (Java): Provide ErrorReason to identify handlers closed by exceptions in callback methods (15047)

Additional exception handling has been added around handler callbacks. When an exception is thrown by a handler callback method the handler will be closed and a notification passed to the handler's onError callback. The ErrorReason will be code 105, "An application callback threw an exception. Check logs for more information.". The log message ID PUSH-000628 has been added for these exceptions. Any exceptions thrown by the onClose or onError callback methods will be logged but onError will not be notified.

Unified API (Java): The deprecated Topics.getStreamsForTopic() method has been removed (15211)

The Topics.getStreamsForTopic() method has been removed. It was deprecated in Diffusion 5.7.0.

Unified API (Java): SUBSCRIPTION_REFRESH reason (15266)

A new UnsubscribeReason has been added to the Topics feature of the Java Unified API. UnsubscribeReason.SUBSCRIPTION_REFRESH indicates the server has re-subscribed a session to the topic. Existing streams are unsubscribed because the topic type and other attributes may have changed. This can happen if a set of servers are configured to use session replication, and the session connected to one server reconnects ("fails over") to a different server.

Unified API (Javascript): New AUTHORIZATION unsubscribe reason (14838)

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.

Unified API (Javascript): JSONDataType.fromJsonString (14998)

The JSON datatype in the JavaScript Unified Client now provides a "fromJsonString" method, allowing instances to be created from a JSON string value.

Unified API (Javascript): New TopicControl.remove capability (15042)

Added TopicControl#removeSelector. This provides the ability to remove topics using TopicSelectors, permitting the user to qualify whether descendant topics should also be removed.

Unified API (Javascript): JSON Structural Delta (15112)

The JavaScript Unified API now provides the ability to derive JSON Structural Deltas from two JSON datatype values, via the JSON#jsonDiff method. Structural deltas allow the user to inspect removed and inserted values at a structural level, as well as determine intersecting or descendant changes for a particular path in the JSON object.

Unified API (Javascript): SUBSCRIPTION_REFRESH reason (15269)

A new UnsubscribeReason has been added to the Topics feature of the JavaScript Unified API. UnsubscribeReason.SUBSCRIPTION_REFRESH indicates the server has re-subscribed a session to the topic. Existing streams are unsubscribed because the topic type and other attributes may have changed. This can happen if a set of servers are configured to use session replication, and the session connected to one server reconnects ("fails over") to a different server.

Bugs Cleared at release 5.9.0

Classic API (Javascript): Receiving topic status messages in classic JS returns an error (15400)

Addresses an issue where an error was thrown when receiving a topic status message - this was due to an undefined variable. This has now been resolved.

Client (Java): Client fails to initialise if the context classloader is set (15247)

The client library failed to correctly initialize from a thread with a context classloader that masked its resources. This problem was found during testing in an OSGi container. A code change has been made to use the appropriate classloader to load resources.

Client (Java): Wrong argument passed to logger for PUSH-000588 (15262)

The correct argument is now passed to the logger.

Demos: hot undeploy/deploy errors with publisher dars (14784)

Addresses issues with the Echo and Dogflight demo, and the Diffusion console when they are hot undeployed and deployed.

Logging: Logging bottleneck under memory pressure (14866)

When the server was running low on memory, the message catalogue could be evicted from memory causing a performance problem as it needed to be reloaded the next time a message was logged. This problem has been resolved.

Replication: Ensure that a HTTP polling client reconnects after failover (12273)

Clients using HTTP polling will now send a reconnect request after failover.

Replication: Update sources not changing state on server close (14721)

With topic replication enabled when two update sources for the same path are registered on different servers only one should be active. If the server with the active update source is shutdown or removed from the cluster it is expected that the standby update source will become active. This was failing in some cases as an incorrect representation was used to associate update sources with a server. This representation was not guaranteed to match the representation used when notifying of servers being removed from the cluster. This was leaving the updater of the removed update source as the active one for the cluster. This has been fixed by changing to a better representation of the server.

Replication: Update sources created before a new server joins might not be removed when the server it was registered on closes (14981)

New members of a cluster were not correctly associating update sources with the server that registered them. If the new member then mediated the removal of a member which registered update sources it would fail to remove them. Update sources that exist when a cluster is joined are now correctly associated with the server that registered them.

Server: Update source registration and close thread safety issue (12500)

A thread safety issue has been identified in server side registration and close of update sources. It caused a NullPointerException to be thrown during the close of update sources. This has been fixed.

Server: Conversation responses incorrectly ignored because of race condition (14968)

Beginning asynchronous operations at the same time in different threads could cause responses to one of the operations to be ignored. The could affect many things including adding topics from different threads at the same time. The race condition has been addressed.

Server: NullPointerException when a classic Java client connects with an empty credentials object (14980)

Addresses an issue where a NullPointerException was thrown when a client application provides a Credentials object with no username or password. The NPE is no longer thrown, instead an empty username or password is set in this case

Server: HTTP MessageChannels leak NetworkChannels with bad consequences for buffer pools (15353)

Management of secondary connections associated with HTTP pooling transport connections has been improved. This removes some possible buffer and file descriptor leaks.

Server: Possible buffer leak on close of SSL network channel (15407)

A rare byte buffer leak was fixed.

Unified API: Handling of invalid updates to JSON and Binary topics (15074)

If a client using the TopicUpdateControl has a stale cached value for a binary or JSON topic, an attempt to update the topic can fail with an UPDATE_FAILED error. The client can recover by removing its locally cached value and trying again. A bug in the error handling of stale updates could instead close the client session, logging an IndexOutOfBoundsException on the server. This bug has been fixed.

Unified API: Fallback streams registered to received JSON values did not filter incompatible updates (15337)

In previous releases, updates for non-JSON topics could be routed to a fallback value stream registered to only receive JSON updates - Topics.addFallbackStream(JSON.class, stream). From this release, fallback value streams only receive updates for topics with compatible data types.

Unified API (.NET): Messaging: correct handling of message that matches no streams (15345)

The handling of an inbound message that matches no streams has been corrected. In previous releases, if the session had never used the Messaging feature, the behavior was correct. However, if the session had used the Messaging feature but not added a stream matching the message or a fallback stream, the message would be discarded and successful delivery to the client would be acknowledged using the onComplete() method of the ISendCallback. From this release, the implementation has been corrected to match the documented behavior. The client will always reject an inbound message that matches no streams, and will log an INFO message. The server will log the rejection as a COMMUNICATION_FAILURE and report the delivery failure to the IMessagingControl sender as a failure using the onDiscard() method of the ISendCallback and the sending session's error handler.

Unified API (Apple): Topic stream delegates not being told of failure on session close (15289)

Topic stream delegates are now sent a message, via their diffusionStream:didFailWithError: implementation, when the session is closed prematurely.

Unified API (Apple): PTDiffusionSessionId description should be lower case (15315)

Session identifier descriptions now use lowercase hexadecimal in order to conform with other client implementations.

Unified API (Apple): feature property exposed on stream interface (15385)

Removes the feature property from the PTDiffusionStream class. It was being unintentionally exposed.

Unified API (C): Use connection response code to determine reconnection eligibility (14457)

The C API now correctly uses the response code from a connection attempt to determine whether it is valid to try reconnecting.

Unified API (C): Use of error structure in session_create() and session_create_async() (14892)

Due to the lifespan of the session, the error parameter passed in the session_create functions could be reused during reconnection but the caller may believe that it is permissible to free the structure once the call has returned. The API will allocate memory internally for the error structure after the session_create call has returned and use that for future (automatic) reconnection attempts.

Unified API (C): Reconnect may fail due to incorrect client state on server (15205)

Reconnection attempts which occur with a retry delay no longer attempt their initial reconnection immediately, but wait for the per-attempt retry timeout first.

Unified API (C): SessionId.toString() should be lower case (15316)

session_id_to_string() now uses lowercase letters for hex digits a-f.

Unified API (Java): If a stream was added twice, it would be notified of session closure twice (15282)

If a subscriber stream was added more than once and the session closed, the stream would be notified more than once. This bug has been fixed in this release.

Unified API (Java): Messaging: correct handling of message that matches no streams (15342)

The handling of an inbound message that matches no streams has been corrected. In previous releases, if the session had never used the Messaging feature, the behavior was correct. However, if the session had used the Messaging feature but not added a stream matching the message or a fallback stream, the message would be discarded and successful delivery to the client would be acknowledged using the onComplete() method of the MessagingControl.SendCallback. From this release, the implementation has been corrected to match the documented behaviour. The client will always reject an inbound message that matches no streams, and will log an INFO message. The server will log the rejection as a COMMUNICATION_FAILURE and report the delivery failure to the MessagingControl sender as a failure using the onDiscard() method of the MessagingControl.SendCallback and the sending session's error handler.

Unified API (Java): JSON Deltas don't report empty fixed-length structures (15388)

The diff algorithm used by JSON Deltas incorrectly skipped empty arrays or objects that had been encoded as a CBOR fixed-length structure. This would manifest as empty structures not being included in reported changes (JSONDelta#inserted, JSONDelta#removed). This has now been fixed.

Unified API (Javascript): JavaScript logging does not reset reconnection attempts after reconnection (14849)

The logging that reports the number of reconnection attempts made was not reset on successful reconnection. This meant that if the connection was lost again after reconnection the logging would report the cumulative number of reconnection attempts. This is now reset on reconnection and the logging reports the attempts since the last connection loss.

Unified API (Javascript): Conversation errors result in session close (14944)

In the JavaScript Unified Client, conversation set errors were incorrectly propagated to the session, resulting in session closure even if the error was recoverable. Conversation errors will now be logged without affecting the session state.

Unified API (Javascript): SessionID equality not obvious to determine (15318)

SessionId.equals() has been added which allows easy comparison of Session IDs.

Unified API (Javascript): Missing delivery information when sending a message to SessionFilter (15319)

When sending a message using session.messages#send to a SessionFilter, the value returned on successful completion did not contain the number of resolved recipients, or any delivery errors. This information has now been added.

Unified API (Javascript): SessionPropertiesListener.onError is missing (15323)

The SessionPropertiesListener interface was missing the "onError" method. This is necessary for errors within the listener to be correctly propagated to the user. Previously, errors would result in the client being closed with poor visibility on the root cause.

Unified API (Javascript): Fallback streams did not filter incompatible updates (15339)

In previous releases, updates for non-JSON topics could be routed to a fallback value stream registered to only receive JSON updates, e.g session.stream("foo").asType(JSONDataType); From this release, fallback value streams only receive updates for topics with compatible data types.

Unified API (Javascript): Session.messages.send should allow sessionid (15340)

Session.messages.send will now accept a SessionId object as well as a string as a target recipient.

Unified API (Javascript): Messaging: correct handling of message that matches no streams (15347)

The handling of an inbound message that matches no streams has been corrected. In previous releases, if the session had not added a stream matching the message or a fallback stream, the message would be discarded and successful delivery to the client would be acknowledged for the sender. From this release, the implementation has been corrected to match the documented behavior. The client will always reject an inbound message that matches no streams, and will log an INFO message. The server will log the rejection as a COMMUNICATION_FAILURE and report the delivery failure to the sender.

Known Issues

Classic API (Publisher/Server): Rapid adds and deletes of topics can cause TopicTreeListener notifications to arrive out of order (15549)

Under some circumstances when the same topic is being added and removed very rapidly it is possible for the added and removed notifications to be delivered to the TopicTreeListener out of order. For example you may get several adds before a remove. Even the addition and removal of different topics when being done very rapidly may not notify in the exact order that the requests were made although this is only likely to cause an issue where processing of branch overlaps. Users should be aware of this possibility but there is no immediate plan to resolve this issue as the cases where it would have an impact are thought to be extremely rare.

Classic API (Publisher/Server): TopicTreeListener notifications incorrect for topic detach/attach operations (15565)

Since release 5.9 it is possible to have unbound topic tree nodes created by the Unified API (i.e a node that has no topic). So when a hierarchic topic A/B/C is created then nodes A and A/B will have no associated topic. But for backwards compatibility when such a topic is created by a publisher then A and A/B will be stateless topics. The publisher API will see such unbound nodes as if they had a stateless topic, even though there is no usable topic at the node. For consistency when the unified API adds a topic to an unbound node the TopicTreeListener is notified of a remove (the notional stateless topic) followed by an add (of the newly attached topic) and when a topic is removed from a node (as opposed to the topic branch being removed) then the TopicTreeListener is notified of a remove (the previous topic) followed by an add (of a notional stateless topic). The problem with this is that in both cases the remove notification suggests that the whole branch has been removed when in fact it has not. It would be more correct if the remove was notified on the TopicDeletionListener but the fact that these are different interfaces makes this impractical. This will be resolved in a future release by rationalising the notifications int a single notification interface.

Console: Console shows fractional users connected (15610)

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

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

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