Lagom 1.2 adds support for message brokers, JDBC, and an overhaul of read sides
Lagom 1.2 is finally here. Some of the highlights of this release are support for message brokers, JDBC, and an overhaul of read sides. But let’s see what this means for users!
In late October, the Lagom team teased the users and announced that the 1.2 version was almost ready. Three weeks later, Lightbend’s Tim Moore, introduced Lagom 1.2 and talked about its biggest features, namely support for message brokers, JDBC, and an overhaul of read sides. Although the users who have been following along with the RCs might not be impressed with the number of changes —there have been just minor changes since RC2—, those who are upgrading from 1.1.0 or earlier are advised to follow the migration guide because there are some changes they need to make to their projects.
Check out the entire list of changes.
What’s new in Lagom 1.2?
Message broker support is indubitably the biggest feature of this release; Lagom new allows both direct streaming of messages between services and streaming of messages via a broker. Plus, it does not require any one particular message broker implementation — still, out of the box they have only implemented support for Kafka since it fits well in the Lagom architectural philosophy.
Lagom automatically runs Kafka when the user runs the
runAll command, both in Maven and sbt. This way, getting started with a project which uses Kafka becomes very simple. It also abstracts the publishing, partitioning, consuming and failure handling of messaging away from the user, so they can focus mainly on their business concerns.
As with Lagom
ServiceCall’s, which offers a protocol agnostic manner of directly communicating with other services that maps down onto HTTP, Lagom provides a new
Topic abstraction —this is a topic that one service publishes, and one or more services consume. All the serialization and deserialization logic for these messages can be captured and shared between services via the use of service descriptors.
According to the official announcement, potential users claim that Lagom would need to have support for using their existing relational database infrastructure if they were to introduce it in their organization. Having no JDBC support prevented organizations from getting the benefits of a Lagom-based architecture, which is why Lagom now supports JDBC both for storing persistent entities, as well as for implementing read sides.
Finally, Lagom’s read side support has been overhauled. These are the most important things users should know:
- Read sides that talk to any data store can now be implemented
- Read sides can now be sharded by tagging persistent entity events with sharded tags
- Both the Cassandra and JDBC specific read side support utilities offer automatic offset tracking, which means that users’ read side processors don’t need to explicitly load and persist offsets. Although the existing Cassandra read side support continues to be supported, it is deprecated.