Symfony NATS Messenger v2

Selectable Serializers

Symfony NATS Messenger v2

Symfony NATS Messenger v2.0.0 is available!

What's new?

Version 2.0.0 represents a significant enhancement to the Symfony NATS Messenger Bridge, focusing on serialization flexibility, comprehensive testing, and developer experience improvements. This release introduces multiple serialization options, dramatically expands test coverage, and provides enhanced development tooling.

New Serializers Added:

  • IgbinarySerializer (Default) - High-performance binary serialization using the igbinary extension
  • SimdDecodingJsonSerializer - JSON serialization with SIMD-accelerated decoding via the simdjson extension
  • AbstractEnveloperSerializer - Base class for creating custom serializers

Supports now configuration of the selected serializer using standard symfony messenger's configuration:

framework:
 messenger:
  transports:
   nats_transport:
    dsn: 'nats-jetstream://localhost:4222/stream/topic'
    serializer: 'IDCT\NatsMessenger\Serializer\IgbinarySerializer' # Example

Breaking changes include simplified tests runners (Makefile instead of few scripts) and using default serializer provided by Symfony which may require to explicilty state that we want to use IgbinarySerializer.

Many thanks go to:

  • @pimjansen for pointing out the required dependency configuration issues and increasing the severity of the serializer PR.
  • @jphooiveld-axtion for preparing the initial version of the PR with selectable serializer.

Symfony NATS Messenger on GitHub