Component test reference

Transports

Transport type reference and settings

A transport connects Verifier to your component on the wire. Each entry in the transports list names the transport, specifies its type and settings, and lists the model connections it carries.

For an introduction to transports and how to choose one, see verifier docs open component.

Configuration Structure

Each transport entry has the following shape:

transports:
  - name: my_transport
    type: zmq
    settings:
      # transport-specific settings
    connections:
      - name: connection_name
    byte_map:
      # optional byte mapping
    topic_map:
      # optional topic mapping
    ignore_messages:
      - MessageToIgnore

Common fields:

  • name: Required Unique identifier for this transport within the configuration.
  • type: Required Transport type string (see Transport Types below).
  • settings: Required Type-specific settings (see each type below).
  • connections: Optional List of model connections this transport carries. Each entry identifies a connection by one of:
    • name: The fully-qualified connection name from the model.
    • to and from: The component names on each end of the connection. Verifier assigns connections automatically when the model has one connection per direction; use connections when you need explicit control.
  • byte_map: Optional Rules to identify message type from raw bytes. See Byte Mapping below.
  • topic_map: Optional Rules to map topic strings to message names and back. See Topic Mapping below.
  • ignore_messages: Optional Fully-qualified message names to discard on this transport without processing.

Transport Types

ZeroMQ (zmq, zeromq)

A ZeroMQ pub/sub transport. Each side holds a publish socket and a subscribe socket.

Settings:

  • pub_socket: Required Publish socket:
    • ip: IP address to connect or bind to
    • port: Port number
    • type: Bind or Connect
  • sub_socket: Required Subscribe socket (same fields as pub_socket)
  • uses_proxy: Optional (Defaults to false) When true, the connection goes through an external ZeroMQ proxy.
  • max_send_size: Optional (Defaults to 65536) Send buffer size in bytes.
  • max_recv_size: Optional (Defaults to 65536) Receive buffer size in bytes.
  • startup_ms: Optional (Defaults to 20) Milliseconds to wait after connecting.
  • curve: Optional ZeroMQ CURVE encryption:
    • public_key: Path to the public key file
    • secret_key: Path to the secret key file
    • server_ip: Server IP address
    • server_key: Server public key

Example:

transports:
  - name: zmq_transport
    type: zmq
    settings:
      uses_proxy: false
      pub_socket:
        ip: 127.0.0.1
        port: 6667
        type: Connect
      sub_socket:
        ip: 127.0.0.1
        port: 6668
        type: Connect

TCP (tcp)

A TCP stream transport. Use Bind on one side and Connect on the other.

Settings:

  • type: Required Bind (listen for incoming connections) or Connect (connect out to the remote end).
  • ip: Required IP address to bind or connect to.
  • port: Required Port number.
  • max_size: Optional (Defaults to 65536) Buffer size in bytes.
  • startup_ms: Optional (Defaults to 20) Milliseconds to wait after connecting.
  • has_topic: Optional (Defaults to false) When true, Verifier expects a topic packet to precede each data packet.
  • use_ipv4: Optional True forces IPv4, false forces IPv6. Left unset, Verifier determines the address family from the address.

Example:

transports:
  - name: to_component
    type: tcp
    settings:
      type: Connect
      ip: 127.0.0.1
      port: 6668
      startup_ms: 100

UDP (udp)

A UDP datagram transport. Settings are the same as TCP.

  • type: Required Bind or Connect.
  • ip: Required IP address.
  • port: Required Port number.
  • max_size: Optional (Defaults to 65536) Buffer size in bytes.
  • startup_ms: Optional (Defaults to 20)
  • has_topic: Optional (Defaults to false) Expect a topic packet before each data packet.
  • use_ipv4: Optional True forces IPv4, false forces IPv6. Unset determines the address family from the address.

ActiveMQ (amq, activemq)

An ActiveMQ pub/sub transport.

Settings:

  • broker_uri: Required Broker URI (e.g., tcp://127.0.0.1:61616)
  • auto_ack: Optional (Defaults to true) Auto-acknowledge messages from the broker.
  • use_text: Optional (Defaults to true) Convert bytes to text before sending.
  • max_send_size: Optional (Defaults to 65536)
  • max_recv_size: Optional (Defaults to 65536)
  • startup_ms: Optional (Defaults to 20)
  • tls: Optional TLS settings:
    • keystore_file: Path to the keystore
    • keystore_pass: Keystore password
    • trust_cert_file: Path to the truststore
    • trust_cert_pass: Truststore password

Kafka (kafka)

A Kafka pub/sub transport.

Settings:

  • brokers: Required Broker address (e.g., 127.0.0.1:9092)
  • group: Required Consumer group ID.
  • partition: Optional (Defaults to 0) Partition to use.
  • max_send_size: Optional (Defaults to 65536)
  • max_recv_size: Optional (Defaults to 65536)
  • startup_ms: Optional (Defaults to 20)

MQTT (mqtt)

An MQTT pub/sub transport.

Settings:

  • pub_socket: Required Publish socket:
    • ip: Broker IP address
    • port: Port number
    • type: Connect
  • sub_socket: Required Subscribe socket (same fields as pub_socket)
  • max_send_size: Optional (Defaults to 65536)
  • max_recv_size: Optional (Defaults to 65536)
  • startup_ms: Optional (Defaults to 20)
  • tls: Optional TLS settings:
    • ca_file: Path to the CA certificate
    • tls_cert: Path to the client certificate
    • tls_key: Path to the client private key

NATS (nats)

A NATS pub/sub transport.

Settings:

  • max_send_size: Optional (Defaults to 65536)
  • max_recv_size: Optional (Defaults to 65536)
  • startup_ms: Optional (Defaults to 20)
  • tls_host: Optional TLS hostname
  • queue_topic: Optional Queue topic name
  • tls: Optional TLS settings:
    • tls_key: Path to the private key
    • tls_cert: Path to the certificate
  • auth: Optional Authentication:
    • username: Username
    • password: Password
    • nk_pub_key: NKey public key
    • nk_seed: NKey seed
  • options: Optional Extended NATS client options including url and timeout. See docs.tangramflex.io for the full option set.

RabbitMQ (rmq, rabbitmq)

A RabbitMQ pub/sub transport.

Settings:

  • url: Required Broker URL (e.g., amqp://127.0.0.1:5672)
  • channel: Required Virtual channel ID.
  • max_send_size: Optional (Defaults to 65536)
  • max_recv_size: Optional (Defaults to 65536)
  • startup_ms: Optional (Defaults to 20)
  • ssl: Optional SSL settings:
    • cert: Path to the client certificate
    • ca_cert: Path to the CA certificate
    • key: Path to the client private key
    • verify_peer: Verify the server certificate
    • verify_hostname: Verify the server hostname

File (file)

A file-based transport. Verifier reads messages from one directory and writes to another.

Settings:

  • recv_dir: Required Directory Verifier reads incoming messages from.
  • send_dir: Required Directory Verifier writes outgoing messages to.

Serial (serial)

A serial-port transport.

Settings:

  • type: Required Bind or Connect.
  • port: Required Serial device path (e.g., /dev/ttyUSB0)
  • baud_rate: Optional (Defaults to 9600)
  • bits_per_byte: Optional (Defaults to 8) Data bits.
  • stop_bits: Optional (Defaults to 1)
  • flow_control: Optional Flow control type.
  • parity: Optional Parity mode.
  • non_blocking: Optional (Defaults to false) Use non-blocking I/O.
  • recv_timeout: Optional (Defaults to 1000) Receive timeout in milliseconds.
  • max_send_size: Optional (Defaults to 65536)
  • max_recv_size: Optional (Defaults to 65536)
  • startup_ms: Optional (Defaults to 20)

Byte Mapping

Use byte_map when the transport carries no topic header and you need to extract the message type from the payload itself. Verifier reads a byte slice from each received message, converts it to an integer or string, and looks up the message name in your map.

  • from: Required Start byte index (inclusive).
  • to: Required End byte index (exclusive).
  • conversion: Required How to interpret the bytes: LittleEndian, BigEndian, or String.
  • map: Required Map from converted value to fully-qualified message name.

Example:

byte_map:
  from: 0
  to: 4
  conversion: LittleEndian
  map:
    "1": "MyPackage::MessageA"
    "2": "MyPackage::MessageB"

Topic Mapping

Use topic_map on topic-routed transports (ActiveMQ, Kafka, MQTT, NATS, RabbitMQ, ZeroMQ) to derive message names from incoming topics and produce outgoing topics from message names.

  • incoming: Optional List of rules for received messages. Each rule:
    • topic_regex: Required Regular expression matched against the incoming topic string. Capture groups are referenced as $1, $2, etc. in the other fields.
    • package: Optional Package name, or a capture group reference.
    • module: Required Module name, or a capture group reference.
    • message: Required Message name, or a capture group reference.
  • outgoing: Optional Template for outgoing topic strings:
    • topic_template (or template): Template string. Supported placeholders:
      • {package}: Package name
      • {module}: Module name
      • {message}: Message name
      • {fullname}: Fully-qualified name

Example:

topic_map:
  incoming:
    - topic_regex: "^myapp/(.+)/(.+)$"
      package: "MyPackage"
      module: "$1"
      message: "$2"
  outgoing:
    topic_template: "{package}/{module}/{message}"