Xbus provides high-level application messaging on top of NATS.



This is a Go project.

Versions of Go we have tested:

  • 1.7

WARNING: We require go 1.7+ because it fixed a nasty issue that made Xbus unstable with previous versions of Go. If using a previous version you will get random errors during json message decoding.


We use govendor as our vendoring tool, you must have it installed in your system (or local tools) to be able to reproduce a correct build of Xbus.


Xbus uses a postgresql database 9.5+ to serialize configuration and events.


Build as a regular Go package:

govendor sync
make install


3 binaries are created:

Each program may be run with --help to see available commands / flags / etc.

Warning: xbusd <xbusd> can produce a LOT of logs when placed under load. The server will crash if it is unable to write to stdio/stderr. Init systems that implement rate limitation for logs (such as systemd) may cause xbusd <xbus> to crash if the server exceeds this limit.


  • The migration directory contains scripts one can use to migrate Xbus databases from one version to the other.


3.0.0-beta.10 (2017-10-19)

  • Fix 3.0.0-beta.9 migration script performances on medium to large databases.
  • Fix an issue when too many inputs or ouputs were defined on a graph node
  • Fix a deadlock in the emission service that can happen with big envelopes sent in many small envelopes with the right timing.
  • Improve process state management:
    • State update is now centralized in a dedicated routine, avoiding some possible race conditions.
    • If an error occurs during state update, the process status is now set in 'error'.
    • When a process status is set to 'error', the reason is added to the process state.
  • xbusd:
    • Add a sentry.dsn setting to send errors to sentry
  • xbus-client:
    • Add a sentry.dsn setting


  • Table graph_node:
    • Change column inputs type to TEXT
    • Change column outpus type to TEXT
  • Table process_log_entry:
    • Add column processing_error (BOOLEAN)
  • Table process_state:
    • Add column status_reason (TEXT)

3.0.0-beta.9 (2017-09-19)

  • solve issue #64 (connection errors when too many client connect at the same time)
  • switch to gnatsd 1.0.2
  • Implement the process 'export' and 'purge' APIs
  • Implement the new process filtering API
  • Track a few the process change timestamps
  • Implement the envelope and logs purge APIs
  • xbusd:
    • add '--gnatsd-http[s]-(host/port)' flags for enabling gnatsd monitoring
    • cert generate: add a '--expire' flag for certificate validity range
    • account accept: add a '--cert-expire' flag for the account cert validity range
  • xbusctl:
    • 'actor reject' now accepts the same arguments as 'actor accept'
    • Add the 'ps export' and 'ps purge' commands
    • Use the new process filtering API to improve the cli
    • Add the 'envelope purge' command
    • Add the 'logs purge' command
    • account accept: add a '--cert-expire' flag for the account cert validity range


  • Table process_state: - Add field status_changed - Add field nodes_state_changed - Add field pm_changed
  • Tables emission, process_log_entry, process_state, route: Add ON DELETE CASCADE to *_process_id_fkey foreign keys
  • Table route_target: Add ON DELETE CASCADE to route_target_route_id_fkey

3.0.0-beta.8 (2017-06-03)

  • Add a postmortem API, service and CLI. They allow to inspect and handle failed processes.
  • Add database connection limit parameter: database.max-connections
  • Add APIs and command line tools (:prog:`xbusctl pm <xbusctl>`) for handling processes with errors or warning after they ended.
  • Add full environment tests, allowing some tests not possible with fullstack_tests, like testing the cli tools, testing random server crashes...
  • Update the graph API implementation, following go-xbus/api changes
  • Make envelope reception more robuts (Issue #39). Some inconsistent states are not possible anymore.
  • Handle gateway authentication with api keys.
  • Fix all the deadlocks we found on heavy load.
  • graph validation: Now identify invalid emitter/consumer input/output, and sourcematch-less emitters.
  • xbusd:
    • 'account accept/reject' now takes id or name in addition to fingerprints
  • xbusctl:
    • Add 'actor delete'
    • Fix 'actor list' filter handling
    • 'actor accept/reject' now takes a name or id
    • Add 'account delete'
    • Refactor 'graph' commands. The graph source file is now never updated by the command, and the name, version and status are updated by command line actions and arguments, not in the source file.
  • [doc] Document the "processing end" message in the connector API doc.
  • [doc] Fix minor issues in the connector API doc.


  • Table process_state: - Add field pm_level varchar(255) - Add field pm_status varchar(255) - Add field pm_comment varchar(255)


  • A backwards incompatible change has been introduced in the configuration: database becomes database.dsn, the cli flag database becomes database-dns. Refer to the sample file etc/xbusd_sample.yaml.

3.0.0-beta.7 (2017-03-09)

  • Add support for fragmented envelopes, which implies a lot of code cleaning and a few refactoring.
  • Add a route cache
  • Reduce broker/emission coupling


  • Now requires Postgresql >= 9.5
  • New Table: route
  • New Table: route_target

3.0.0-beta.6 (2017-02-03)

  • [doc] Update Quickstart to match latest go-xbus demo.relay settings
  • [auth] Remove debug log when a client is authenticated
  • Switch to :ref:`go-xbus <go-xbus>` 3.0.0-beta.6
  • Fix a host / port parsing issue that was preventing the nats-host setting from being set to

3.0.0-beta.5 (2017-01-26)

  • Switch to go-xbus 3.0.0-beta.5
  • Fix: graph validation error message for invalid edges were wrong ('origin' was switched with 'destination'.
  • Doc: Add a fully fonctionnal graph to the Quickstart section, making it a complete and running example of a bus.


  • New: Graph nodes how have a actors attribute, which references actors by name or id. The actorids attribute is deprecated.
  • Fix: In case no graph matches a new envelope, a ack error is returned to the emitter.


  • New: Table graph_node: add field actors varchar(255)


  • xbusd: Allow custom hostdefs for server CA
  • xbus-client: Embed demo actors from go-xbus/demo

3.0.0-beta.4 (2017-01-20)

  • Build releases binaries from the right changeset.
  • Extract reusable parts of this program to :ref:`go-xbus <go-xbus>`.
  • Switch to go-xbus 3.0.0-beta.4

3.0.0-beta.3 (2017-01-13)


  • API Break: Add the "ActorProcessingEnd" entry point. It must be called by consumers to signal processing success or failure, and by other actors for processing errors. It adds support for long-running processing by consumers without hitting transfert timeout.
  • API Beak: Rename ActorType to ActorKind, and all 'Type' fields of type ActorType to 'Kind'.
  • API Addition: Add a logging API for actors.


  • Provides a SQL migration script, that does: - actor table: Drop unique index (name / type). - actor table: Add a unique index (name). - actor table: Rename type to kind. - emission table: event_positions type changed to TEXT (was VARCHAR(255)) - New log_entry table that stores log messages.


  • Gnatsd: switch to upstream version (which merged our TLS auth related patch)
  • Better test coverage
  • More graph examples in the graph doc
  • Graph validation: Check for invalid or duplicate node ids
  • xbus-client: Better behavior when configuration file is missing
  • make xbus-client/cmd extendable
  • client: Add apis to easily start a group of actors from a configuration file

3.0.0-beta.2 (2016-12-22)

  • Graph validation. When pushing a graph, a list of validation errors (if any) will be returned and displayed. A non-valid graph cannot be published, preventing many common mistakes that would be otherwise hard to detect.
  • Optionnally capture SQL logs (see :ref:`xbusd serve` options --debug-sql-queries and --debug-sql-bindings)
  • Embed detailed version information in the binaries (try --version and --full-version flags on the binaries)
  • Upgrade gnatsd embedded version
  • Build static binaries
  • Embed documentation in the distribution package
  • Documentation fixes
  • A few logging level changes

3.0.0-beta.1 (2016-12-12)

Initial release. It features:

  • Handling of simple envelopes
  • Graphs
  • Process
  • Account/actors management
  • ...