Skip to content
Simple Binary Encoding (SBE) - High Performance Message Codec
Branch: master
Clone or download
Latest commit dd7a228 Apr 19, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
cppbuild [C++]: add output-on-failure to ctest args. Mar 28, 2019
gradle/wrapper [Java] Upgrade to Gradle 5.3.1. Mar 28, 2019
.gitignore Issue#661 Always return a valid bitset type Apr 6, 2019
CMakeLists.txt Merge pull request #638 from Niko-Klaiber/add_c_generator Mar 13, 2019
LICENSE Initial commit Sep 3, 2013 Update Mar 28, 2019
build.gradle [Java] Upgrade to Mockito 2.27.0. Apr 11, 2019
gradlew [Java] Upgrade to Gradle 5.3.1. Mar 28, 2019

Simple Binary Encoding (SBE)

Javadocs Build Status GitHub Code Quality: Java Total Alerts

SBE is an OSI layer 6 presentation for encoding and decoding binary application messages for low-latency financial applications. This repository contains the reference implementations in Java, C++, Golang, and C#.

Further details on the background and usage of SBE can be found on the Wiki.

An XSD for SBE specs can be found here. Please address questions about the specification to the SBE FIX community.

For the latest version information and changes see the Change Log with downloads at Maven Central.

The Java and C++ SBE implementations are designed with work very efficiently with the Aeron messaging system for low-latency and high-throughput communications. The Java SBE implementation has a dependency on Agrona for its buffer implementations.


Binaries and dependency information for Maven, Ivy, Gradle, and others can be found at

Example for Maven:



The project is built with Gradle using this build.gradle file.

Full clean build:

$ ./gradlew

Run the Java examples

$ ./gradlew runJavaExamples


Jars for the executable, source, and javadoc for the various modules can be found in the following directories:


An example to execute a Jar from command line using the 'all' jar which includes the Agrona dependency:

java -Dsbe.output.dir=include/gen -Dsbe.errorLog=yes -jar sbe-all/build/libs/sbe-all-1.12.5-SNAPSHOT.jar my_sbe_input.xml

C++ Build using CMake

NOTE: Linux, Mac OS, and Windows only for the moment. See FAQ. Windows builds have been tested with Visual Studio Express 12.

For convenience, a script is provided that does a full clean, build, and test of all targets as a Release build.

$ ./cppbuild/cppbuild

If you are comfortable with using CMake, then a full clean, build, and test looks like:

$ mkdir -p cppbuild/Debug
$ cd cppbuild/Debug
$ cmake ../..
$ cmake --build . --clean-first
$ ctest

Note: A C generator is included with the C++ build. And is built with the C++ build. Currently, the C generator is a work in progress.

Golang Build

First build using Gradle to generate the SBE jar and then use it to generate the golang code for testing

$ ./gradlew
$ ./gradlew generateGolangCodecs

For convenience on Linux, a gnu Makefile is provided that runs some tests and contains some examples

$ cd gocode
# make # test, examples, bench

Users of golang generated code should see the user documentation.

Developers wishing to enhance the golang generator should see the developer documentation

C# Build

As of May 2017, the CSharp build is considered a preview release. API stability is not yet guaranteed. User and Developer guides are not yet released or are incomplete.

First build using Gradle to generate the SBE jar and then use it to generate the C# code used for testing and the examples.

$ ./gradlew
$ ./gradlew generateCSharpCodecs

You can then use the Visual Studio 2017 Community solution to build and explore the example. This solution also builds some tests which can be run via the provided script.

Users of CSharp generated code should see the user documentation (coming).

Developers wishing to enhance the CSharp generator should see the developer documentation (coming)

License (See LICENSE file for full license)

Copyright 2014-2019 Real Logic Limited
Copyright 2017 MarketFactory Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.