configuration gateway

This is the runtime configuration for a casual domain.

The sections can be splitted in arbitrary ways, and aggregated to one configuration model casual uses. Same sections can be defined in different files, hence, give more or less unlimited configuration setup.

Most of the sections has a property note for the user to provide descriptions of the documentation. The examples further down uses this to make it easier to understand the examples by them self. But can of course be used as a mean to help document actual production configuration.

domain.gateway

Defines configuration for communication with other casual domains.

domain.gateway.inbound

Defines all inbound related configuration (from remote domains -> local domain)

Limit (structure)

property

description

[size : integer]

max size in bytes

[messages : integer]

max number of messages in flight

domain.gateway.inbound.default

Will be used as default values for all groups.

property

description

default

[limit : Limit]

default value for limit

[connection.discovery.forward : boolean]

if a discovery is allowed to propagate downstream

false

domain.gateway.inbound.groups.Connection (structure)

Defines a connection that this inbound group should listen to

property

description

default

address : string

the address to listen on, host:port

[discovery.forward : boolean]

if a discovery is allowed to propagate downstream

domain.gateway.inbound.default.connection.discovery.forward

domain.gateway.inbound.groups (list)

Defines a list of all inbound groups

property

description

default

[alias : string]

an identity for this group instance

generated unique name

[limit : Limit]

upper limits of inflight messages

domain.gateway.inbound.default.limit

[connections : [Connection]]

all the connections for this group

domain.gateway.outbound

Defines all outbound related configuration (from local domain -> remote domains)

domain.gateway.outbound.groups.Connection (structure)

Defines a connection that this outbound group should try to connect to.

property

description

address : string

the address to connect to, host:port

[services : [string]]

services we’re expecting to find on the other side

[queues : [string]]

queues we’re expecting to find on the other side

services and queues is used as an optimization to do a build discovery during startup. casual will find these services later lazily otherwise. It can also be used to do some rudimentary load balancing to make sure lower prioritized connections are used for services and queues that could be discovered in higher prioritized connections.

domain.gateway.outbound.groups (list)

Each group gets an order in the order they are defined. Groups defined lower down will only be used if the higher ups does not provide the wanted service or queue. Hence, the lower downs can be used as fallback.

property

description

default

[alias : string]

an identity for this group instance

generated unique name

[order : integer]

a number that is used for load-balancing

the implied order in the configuration

[connections : [Connection]]

all the connections for this group

All connections within a group, and all groups with the same order ar treated equal. Service calls will be load balanced with randomization. Although, casual will try to route the same transaction to the previous associated connection with the specific transaction. This is done to minimize the amount of resources involved within the prepare and commit/rollback stage.

domain.gateway.reverse

This section defines reverse inbound and outbound. The connection phase is reversed.

  • outbound connection listen to it’s’ configured address.

  • inbound connections tries to connect to it’s configured address.

Otherwise, the semantics and configuration are exactly the same.

domain.gateway.reverse.inbound

Exactly the same as domain.gateway.inbound

domain.gateway.reverse.outbound

Exactly the same as domain.gateway.outbound

examples