Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

407 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tagline

Tagline is a fast Financial Information Exchange (FIX) codec for Netty. It's not a full-blown FIX protocol implementation, but you can use it to build one. If you have used Netty's built-in codecs, such as HTTP, you shouldn't have trouble using Tagline.

Tagline decodes incoming FIX messages and encodes outgoing FIX messages. It handles the BeginString(8), BodyLength(9), and CheckSum(10) fields and implements the standard FIX data types. Tagline is for you if you're building a low-latency FIX application or a higher-level FIX protocol implementation.

Tagline requires Java 11 or newer and Netty 4.2.x.

Installation

Add Tagline to your project:

<dependency>
  <groupId>org.jvirtanen.tagline</groupId>
  <artifactId>tagline-codec</artifactId>
  <version><!-- the latest version --></version>
</dependency>

See the release notes for the latest version.

Usage

Add Tagline to a channel:

var pipeline = channel.pipeline();

pipeline.addLast(new OutboundFixMessageEncoder(), new InboundFixMessageDecoder(),
    new FixFieldListDecoder());

Send a FIX message:

channel.writeAndFlush(new DefaultOutboundFixMessage(FixVersion.FIX_4_2, channel.alloc())
    .addChar(35, 'A')
    .addString(49, "initiator")
    .addString(56, "acceptor")
    .addInt(34, 1)
    .addTimestamp(52, System.currentTimeMillis(), FixTimeFormat.WITH_MILLISECONDS)
    .addInt(98, 0)
    .addInt(108, 30));

See more use cases in Tagline Handbook.

Performance

Tagline incurs as little performance overhead as possible. To illustrate, it encodes an Order Single (D) message in 100 ns and decodes one in 56 ns on an Apple MacBook Pro (M3 Max, 2023) with Eclipse Temurin 25 and macOS Tahoe.

Read more about performance in Tagline Handbook, or run Tagline Bench, Tagline Acceptor, and Tagline Initiator to see for yourself.

License

Copyright 2024 Jussi Virtanen.

Released under the Apache License, Version 2.0. See LICENSE.txt for details.

Releases

Contributors

Languages