Configuration Schema

The JSON configuration provided to the Queue Connector Device via Configuration Database, Property or Command Parameter must conform to the schema outlined by QueueConnectorDescriptor.

Note

Whilst it is valid to configure with no exchanges, doing so will keep the device in the STANDBY state. This behaviour may change in future.

Schema

QueueConnectorDescriptor

Primary JSON serializable descriptor for configuring a queue connector device. Note: exchanges as dictionary of groups is experimental and not fully supported via configuration database.

type

object

properties

  • exchanges

Exchanges

default

null

anyOf

type

object

additionalProperties

type

array

items

ExchangeDescriptor

type

array

items

ExchangeDescriptor

type

null

additionalProperties

False

BufferWithTimePipeDescriptor

type

object

properties

  • type

Type

default

BufferWithTimePipe

const

BufferWithTimePipe

  • timespan

Timespan

type

number

default

0

additionalProperties

False

DefaultPipeDescriptor

type

object

properties

  • type

Type

default

DefaultPipe

const

DefaultPipe

additionalProperties

False

ExchangeDescriptor

Descriptor for instantiating an exchange.

type

object

properties

  • dtype

Dtype

default

str

anyOf

type

string

type

array

items

type

array

items

maxItems

3

minItems

2

  • shape

Shape

type

array

default

items

  • source

Source

anyOf

oneOf

InMemorySourceDescriptor

TangoSubscriptionSourceDescriptor

TangoPointingSubscriptionSourceDescriptor

KafkaConsumerSourceDescriptor

type

array

items

oneOf

InMemorySourceDescriptor

TangoSubscriptionSourceDescriptor

TangoPointingSubscriptionSourceDescriptor

KafkaConsumerSourceDescriptor

  • sink

Sink

oneOf

InMemorySinkDescriptor

TangoLocalAttributeSinkDescriptor

TangoArrayScatterAttributeSinkDescriptor

TangoObjectScatterAttributeSinkDescriptor

TangoRemoteAttributeSinkDescriptor

KafkaProducerSinkDescriptor

  • pipe

Pipe

default

type

DefaultPipe

oneOf

DefaultPipeDescriptor

BufferWithTimePipeDescriptor

additionalProperties

False

InMemorySinkDescriptor

Descriptor for instantiating an InMemorySink

type

object

properties

  • type

Type

default

InMemorySink

const

InMemorySink

  • key

Key

type

string

additionalProperties

False

InMemorySourceDescriptor

Descriptor for instantiating an InMemorySource

type

object

properties

  • type

Type

default

InMemorySource

const

InMemorySource

  • data

Data

type

array

items

anyOf

type

array

maxItems

2

minItems

2

type

array

items

type

object

type

integer

type

number

type

boolean

type

string

  • delay

Delay

type

number

default

0

additionalProperties

False

KafkaConsumerSourceDescriptor

type

object

properties

  • type

Type

default

KafkaConsumerSource

const

KafkaConsumerSource

  • servers

Servers

anyOf

type

string

type

array

items

type

string

  • topic

Topic

type

string

  • encoding

Encoding

type

string

enum

utf-8, ascii, python, json, msgpack_numpy, npy, carray

default

python

additionalProperties

False

KafkaProducerSinkDescriptor

type

object

properties

  • type

Type

default

KafkaProducerSink

const

KafkaProducerSink

  • servers

Servers

anyOf

type

string

type

array

items

type

string

  • topic

Topic

type

string

  • encoding

Encoding

type

string

enum

utf-8, ascii, python, json, msgpack_numpy, npy, carray

default

python

  • message_max_bytes

Message Max Bytes

type

integer

default

1048576

  • timestamp_options

default

null

anyOf

TimestampOptions

type

null

additionalProperties

False

TangoArrayScatterAttributeSinkDescriptor

A Tango Attribute Sink for splitting and scattering of ndarray data.

type

object

properties

  • type

Type

type

string

enum

TangoArrayScatterAttributeSink, TangoSplitAttributeSink

default

TangoArrayScatterAttributeSink

  • attribute_names

Attribute Names

type

array

items

type

string

  • axis

Axis

type

integer

default

0

  • default_value

Default Value

default

anyOf

type

array

maxItems

2

minItems

2

type

array

items

type

object

type

integer

type

number

type

boolean

type

string

  • attribute_shape_names

Attribute Shape Names

default

null

anyOf

type

array

items

type

string

type

null

  • indices

Indices

default

null

anyOf

type

array

items

type

integer

type

null

additionalProperties

False

TangoAttributeDescriptor

An attribute descriptor describing a filter and path to to a value in JSON.

type

object

properties

  • attribute_name

Attribute Name

type

string

  • dtype

Dtype

anyOf

type

string

type

array

items

type

array

items

maxItems

3

minItems

2

  • shape

Shape

type

array

default

items

type

integer

  • path

Path

type

string

default

@

  • filter

Filter

default

null

anyOf

type

string

type

null

  • default_value

Default Value

default

anyOf

type

array

maxItems

2

minItems

2

type

array

items

type

object

type

integer

type

number

type

boolean

type

string

additionalProperties

False

TangoLocalAttributeSinkDescriptor

type

object

properties

  • type

Type

default

TangoLocalAttributeSink

const

TangoLocalAttributeSink

  • attribute_name

Attribute Name

type

string

  • default_value

Default Value

default

anyOf

type

array

maxItems

2

minItems

2

type

array

items

type

object

type

integer

type

number

type

boolean

type

string

additionalProperties

False

TangoObjectScatterAttributeSinkDescriptor

A Tango Attribute Sink for splitting and scattering object heirarchy data.

type

object

properties

  • type

Type

default

TangoObjectScatterAttributeSink

const

TangoObjectScatterAttributeSink

  • attributes

Attributes

type

array

items

TangoAttributeDescriptor

additionalProperties

False

TangoPointingSubscriptionSourceDescriptor

type

object

properties

  • type

Type

default

TangoPointingSubscriptionSource

const

TangoPointingSubscriptionSource

  • device_name

Device Name

type

string

  • attribute_name

Attribute Name

type

string

  • etype

Etype

type

integer

default

0

  • stateless

Stateless

type

boolean

default

True

additionalProperties

False

TangoRemoteAttributeSinkDescriptor

type

object

properties

  • type

Type

default

TangoRemoteAttributeSink

const

TangoRemoteAttributeSink

  • device_name

Device Name

type

string

  • attribute_name

Attribute Name

type

string

additionalProperties

False

TangoSubscriptionSourceDescriptor

type

object

properties

  • type

Type

default

TangoSubscriptionSource

const

TangoSubscriptionSource

  • device_name

Device Name

type

string

  • attribute_name

Attribute Name

type

string

  • etype

Etype

type

integer

default

0

  • stateless

Stateless

type

boolean

default

True

additionalProperties

False

TimestampOptions

A set of kafka producer options related to extracting Kafka timestamps from dynamic data. Timestamps in dynamic data must be one of:

  • An offset to unix epoch in milliseconds.

  • A numpy datetime64 on TAI scale.

type

object

properties

  • slices

Slices

type

array

default

items

anyOf

type

integer

type

array

items

anyOf

type

integer

type

null

maxItems

3

minItems

3

  • key

Key

default

null

anyOf

type

string

type

null

  • reducer

Reducer

default

null

anyOf

type

string

enum

min, max, mean

type

null

additionalProperties

False

Note

bold indicates a required key-value pair.

Examples

Empty Config

{}

Image Config

{
    "exchanges": [
        {
            "dtype": "float32",
            "shape": [2,2],
            "source": {
                "type": "InMemorySource",
                "data": [
                    [[0,0],
                    [0,1]],
                    [1.0, 2.0],
                    2.0,
                    2.1,
                    2.5,
                ],
                "delay": 0.5
            },
            "sink": {
                "type": "KafkaProducerSink",
                "topic": "test-topic",
                "servers": "localhost",
                "encoding": "carray"
            }
        },
        {
            "dtype": "float32",
            "shape": [2,2],
            "source": {
                "type": "KafkaConsumerSource",
                "topic": "test-topic",
                "servers": "localhost",
                "encoding": "carray"
            },
            "sink": {
                "type": "TangoLocalAttributeSink",
                "attribute_name": "matrix",
                "default_value": 0
            }
        }
    ]
}