Skip to content

Simple Binary Encoding SBE provides a code generator that produces high performance encoders and decoders for binary application messages. SBE is also used extensively in the internals of Aeron, Aeron Archive and Aeron Cluster.

Some important items to consider about SBE:

  • SBE was created as a fast binary variant of FIX, and thus it is close to FIX in spirit, and is not optimized for general use. This doesn't mean SBE is only suitable as a replacement of FIX.
  • SBE does not hold any data about the layout of the buffer, and does not support random access for variable length fields. Developers have to be careful about how data is written and read by the encoders and decoders respectively or they are likely to have unexpected results
  • SBE offers partial backwards version compatibility, which can be useful if used for Aeron cluster snap shotting. The optional attribute on fields is particularly helpful here.
  • SBE is suitable for messages in Aeron to Aeron as well as to/from Aeron clusters.
  • SBE supports several languages including Java, .NET and C++. There is no browser language support
  • SBE supports optional values as well as repeating groups and shared components. Repeating groups have several restrictions, and components are somewhat further restricted.

Usage Notes

  • It is generally recommended that protocol messages be kept in a dedicated dependency.
  • IntelliJ can have trouble finding the source code when using gradle. See the usage of the idea plugin within the gradle file for a solution.

Further SBE resources

Simple Binary Encoding Wiki

SBE Car sample

Back to top