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.toandfrom: The component names on each end of the connection. Verifier assigns connections automatically when the model has one connection per direction; useconnectionswhen 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 toport: Port numbertype:BindorConnect
sub_socket: Required Subscribe socket (same fields aspub_socket)uses_proxy: Optional (Defaults tofalse) When true, the connection goes through an external ZeroMQ proxy.max_send_size: Optional (Defaults to65536) Send buffer size in bytes.max_recv_size: Optional (Defaults to65536) Receive buffer size in bytes.startup_ms: Optional (Defaults to20) Milliseconds to wait after connecting.curve: Optional ZeroMQ CURVE encryption:public_key: Path to the public key filesecret_key: Path to the secret key fileserver_ip: Server IP addressserver_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: RequiredBind(listen for incoming connections) orConnect(connect out to the remote end).ip: Required IP address to bind or connect to.port: Required Port number.max_size: Optional (Defaults to65536) Buffer size in bytes.startup_ms: Optional (Defaults to20) Milliseconds to wait after connecting.has_topic: Optional (Defaults tofalse) 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: RequiredBindorConnect.ip: Required IP address.port: Required Port number.max_size: Optional (Defaults to65536) Buffer size in bytes.startup_ms: Optional (Defaults to20)has_topic: Optional (Defaults tofalse) 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 totrue) Auto-acknowledge messages from the broker.use_text: Optional (Defaults totrue) Convert bytes to text before sending.max_send_size: Optional (Defaults to65536)max_recv_size: Optional (Defaults to65536)startup_ms: Optional (Defaults to20)tls: Optional TLS settings:keystore_file: Path to the keystorekeystore_pass: Keystore passwordtrust_cert_file: Path to the truststoretrust_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 to0) Partition to use.max_send_size: Optional (Defaults to65536)max_recv_size: Optional (Defaults to65536)startup_ms: Optional (Defaults to20)
MQTT (mqtt)
An MQTT pub/sub transport.
Settings:
pub_socket: Required Publish socket:ip: Broker IP addressport: Port numbertype:Connect
sub_socket: Required Subscribe socket (same fields aspub_socket)max_send_size: Optional (Defaults to65536)max_recv_size: Optional (Defaults to65536)startup_ms: Optional (Defaults to20)tls: Optional TLS settings:ca_file: Path to the CA certificatetls_cert: Path to the client certificatetls_key: Path to the client private key
NATS (nats)
A NATS pub/sub transport.
Settings:
max_send_size: Optional (Defaults to65536)max_recv_size: Optional (Defaults to65536)startup_ms: Optional (Defaults to20)tls_host: Optional TLS hostnamequeue_topic: Optional Queue topic nametls: Optional TLS settings:tls_key: Path to the private keytls_cert: Path to the certificate
auth: Optional Authentication:username: Usernamepassword: Passwordnk_pub_key: NKey public keynk_seed: NKey seed
options: Optional Extended NATS client options includingurlandtimeout. 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 to65536)max_recv_size: Optional (Defaults to65536)startup_ms: Optional (Defaults to20)ssl: Optional SSL settings:cert: Path to the client certificateca_cert: Path to the CA certificatekey: Path to the client private keyverify_peer: Verify the server certificateverify_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: RequiredBindorConnect.port: Required Serial device path (e.g.,/dev/ttyUSB0)baud_rate: Optional (Defaults to9600)bits_per_byte: Optional (Defaults to8) Data bits.stop_bits: Optional (Defaults to1)flow_control: Optional Flow control type.parity: Optional Parity mode.non_blocking: Optional (Defaults tofalse) Use non-blocking I/O.recv_timeout: Optional (Defaults to1000) Receive timeout in milliseconds.max_send_size: Optional (Defaults to65536)max_recv_size: Optional (Defaults to65536)startup_ms: Optional (Defaults to20)
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, orString.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(ortemplate): 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}"