The CometD Project is happy to announce the availability of CometD 3.1.0.
CometD 3.1.0 builds on top of the CometD 3.0.x series, bringing improvements and new features.
You can find a migration guide at the official CometD documentation site.
What’s new in CometD 3.1.0
CometD 3.1.0 now supports HTTP/2.
HTTP/2 support should be transparent for applications, since the browser on the client-side and the server (such as Jetty) on the server-side will take care of handling HTTP/2 so that nothing changes for applications.
However, CometD applications may now leverage the fact that the application is deployed over HTTP/2 and remove the limit of only one outstanding long poll per client.
This means that CometD applications that are opened in multiple browser tabs and using HTTP/2 can now have each tab performing the long poll, rather than just one tab.
CometD 3.1.0 brings support for messages containing binary data.
CometD 3.1.0 allows applications to specify binary data in messages, and the CometD implementation will take care of converting the binary data into the textual format (using the Z85 encoding) required to send the message, and of converting the textual format back into binary data when the message is received.
CometD 3.1.0 is now also deployed to NPM and Bower.
The package name for both NPM and Bower is
cometd, please make sure you filter out all the other variants such as
cometd-jquery that are not directly managed by the CometD Project.
You can now use CometD from within Angular 1 applications in a way that is very natural for Angular 1 users.
Supporting vanilla transports was possible since recent browsers have finally fixed all the quirks and agreed on the
A couple of new Java APIs have been added, detailed in the migration guide.
What’s changed in CometD 3.1.0
window.sessionStorage, so now the CometD reload extension is using the
SessionStorage mechanism rather than using cookies.
You can find the details on the CometD reload extension documentation.
It is now forbidden to invoke
handshake() multiple times without disconnecting in-between, so applications need to ensure that the handshake operation is performed only once.
Adding support for binary data revealed a mistake in the processing of incoming messages. While this has not been fixed in CometD 3.0.x to avoid breaking existing code, it had to be fixed in CometD 3.1.0 to support correctly binary data.
This change affects only applications that have written custom extensions, implementing either
ServerSession.Extension.send(...). Refer to the migration guide for further details.
CometD 3.1.0 now supports all Jetty versions from the 9.2.x, 9.3.x and 9.4.x series.
While before only the Jetty 9.2.x series was officially supported, now we have decided to support all the above Jetty series to allow CometD users to benefit from bug fixes and performance improvements that come when upgrading Jetty.
Do not mix Jetty versions, however. If you decide to use Jetty 9.3.15, make sure that all the Jetty libraries used in your CometD application reference that Jetty version, and not other Jetty versions.
What’s been removed in CometD 3.1.0
CometD 3.1.0 drops support for Jackson 1.x, since Jackson 2.x is now mainstream.
allowMultiSessionsNoBrowser has been removed, since sessions not identified by the CometD cookie are not allowed anymore for security reasons.
CometD 3.1.0 is now the mainstream CometD release, and will be the primary focus for development and bug fixes.
CometD 3.0.x enters the maintenance mode, so that only urgent or sponsored fixes will be applied to it, possibly leading to new CometD 3.0.x releases – although these will be rare.
Work on CometD 4.x will start soon, using issue #647 as the basis to review the CometD APIs to be fully non-blocking and investigating the possibility of adding backpressure.