BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Axon Framework 3.3 with a Subscription Query API and Kafka Support

Axon Framework 3.3 with a Subscription Query API and Kafka Support

This item in japanese

The latest version of the Axon Framework comes with a Subscription Query API, making it possible to subscribe to updates of a specific query model and a Deadline Manager that allows for scheduling of deadline messages. The recently released version 3.3 also adds an Axon-Kafka module, allowing for the use of Kafka to send and receive events.

With the new Subscription Query API, it’s no longer neccesary to periodically check a query model to find out if it has been updated; instead it’s now possible to add a subscription to the model and thus receive all its updates.

Using the new Deadline Manager, a deadline message can be scheduled for publishing at a specific point in time. This message can then be handled in the scope of an Aggregate or a Saga instance by adding a function annotated to handle deadline messages.

The Axon-Kafka module makes it possible for Axon to use Kafka to send and receive events. Kafka also provides a solution for streaming events which gives Axon the ability to replay an event processor when it receives the events from a Kafka source. Using Kafka Streams for event sourcing has both been suggested and questioned, and this was also discussed among the developers behind Axon. In the final implementation Axon uses Kafka as a streamable message source – as a way to receive events in a distributed setup.

Other improvements include:

  • An aggregate root can now instantiate another aggregate, something often needed within a domain.
  • Simplified configuration of Handler definitions. Among other things this enables one event processor to handle several Sagas.
  • Query handlers that run asynchronous tasks can now declare a generic future return type.
  • An aggregate can now access its own version, thus enabling it to detect conflicting changes and to ensure that a query result contains the correct modifications made.

An updated version, 3.3.2 has recently been released. This new release fixes three issues found, and for those on version 3.3 an upgrade is strongly recommended.

Axon Framework is an open source product for the JVM platform providing the building blocks for systems based on the CQRS and Event Sourcing architectural patterns. The framework was founded 2009 by Allard Buijze and is licensed under the Apache License, Version 2.0. There are a couple of small example applications based on Axon available for download.

Earlier this year AxonIQ released its own event sourced database, AxonDB, with support for pushed-based event publishing and a fully ACID compliant transactional model, meaning that multiple events can be appended in a single transaction. A free developer edition is available for download.

Rate this Article

Adoption
Style

BT