A high-performance C++ implementation of SASS/RV messaging middleware with enhanced features for market data distribution and real-time messaging. This implementation provides API compatibility while offering improved performance, and additional message formats.
- SASS/RV Compatibility: Drop-in replacement for SASS/RV APIs
- Multiple Message Formats: Support for RV, TibMsg, SASS, RWF, Mktfeed, and JSON
- High Performance: Optimized C++ implementation with low-latency message processing
- Fault Tolerance: Two FT (Fault Tolerance) mechanisms for high availability
- Advanced Monitoring: Subscription tracking using the RV subscription management
- Market Data Support: Specialized features for financial market data distribution
- Dictionary Integration: Support for SASS and CFile dictionary formats
- Intraprocess Communication: High-speed local messaging via process transport
Main library providing the core RV implementation and event-driven architecture.
Key Components:
EvRvListen- TCP listener for accepting RV connectionsEvRvClient- Client connection management and messagingRvHost/RvHostDB- Host database and network managementSubMgr- Subscription management and routingFtMember/FtMonitor- Fault tolerance group management
Legacy RV5 API compatibility layer.
Key Components:
rv_Session- RV session managementrv_Listener- Message listener interfacerv_Timer/rv_Signal- Timer and signal handling- Message creation and manipulation functions
RV7 compatible API implementation.
Key Components:
tibrvMsg- TibRV message handlingtibrvEvent- Event and listener managementtibrvTransport- Transport creation and managementtibrvQueue- Message queue and dispatching- Full TibRV field type support (strings, arrays, dates, etc.)
Fault tolerance extensions for RV7 API.
Key Components:
tibrvftMember- FT group member managementtibrvftMonitor- FT group monitoring- Automatic failover and weight-based priority
Purpose: RV daemon server/listener
Usage: rv_server -r <port>
Description: Acts as the central RV daemon, listening for client connections and managing RV network topology. Handles host registration, service discovery, and message routing between clients. This does not contain a multicast transport, that is a part of the Rai MS (Multicast Services) daemon.
Purpose: Advanced RV data subscriber/client
Usage: rv_client -d daemon -s service subject1 subject2...
Description: High-performance RV client for subscribing to subjects and receiving market data. Features include dictionary loading, latency tracking, rate monitoring, and statistical analysis.
Key Features:
- Multiple dictionary formats (SASS, CFile)
- Snapshot and live subscription modes
- Message latency and timing statistics
- Quiet mode and hex dump capabilities
Purpose: RV data publisher
Usage: rv_pub -d daemon -m rate -k count -p times subject1 subject2...
Description: Publishes test market data messages to RV subjects with configurable rates and formats.
Key Features:
- Multiple message formats (JSON, RV, TibMsg, SASS)
- Rate limiting and burst control
- Custom payload and record type support
- Random subject selection patterns
Purpose: RV7 C API demonstration client
Usage: api_client [-service service] [-network network] [-daemon daemon] subject_list
Description: Demonstrates TibRV-compatible API usage for subscribing to subjects with automatic dictionary handling and snapshot requests.
Purpose: RV5 C API test program
Usage: rv5_api_test [-service service] [-network network] [-daemon daemon] [-subject subjects]
Description: Simple test demonstrating RV5 C API functionality including session creation, message listening, and callback handling.
Purpose: RV5 C++ API test program
Usage: rv5_cpp_test [same options as rv5_api_test]
Description: C++ wrapper test for RV5 API using object-oriented callback handling.
Purpose: RV7 message format test
Usage: rv7_test
Description: Test of RV message creation, manipulation, and serialization. Tests all field types, message arrays, and format validation.
Purpose: Advanced subscription test with Rai MD integration
Usage: subrv7test [-service service] [-network network] [-daemon daemon] subject_list
Description: Advanced subscription client that integrates RV7 API with MD (Market Data) library for complex message format handling.
Purpose: Intraprocess communication test
Usage: intra_test
Description: Tests high-speed local messaging using TIBRV_PROCESS_TRANSPORT with multi-threaded publisher/subscriber pattern.
Purpose: Subscription topology monitor
Usage: rv_subtop -d daemon -t subject_wildcards...
Description: Real-time monitoring of RV subscription topology, showing active hosts, sessions, and subscription reference counts.
Key Features:
- Live topology display
- Session state tracking
- Subscription reference counting
- "Top"-style continuous updates
Purpose: Fault tolerance monitor
Usage: rv_ftmon -d daemon -c cluster -w weight
Description: Monitors and participates in RV fault tolerance groups, displaying real-time FT status and handling failover events.
Key Features:
- FT group participation
- Weight-based priority management
- Primary/secondary/join state monitoring
- Automatic failover handling
The golang/ directory contains a Go implementation that provides CGO bindings to the C libraries:
- subrv7test.go: Go equivalent of the C subrv7test program
- Full API Compatibility: Uses CGO to link with existing C libraries
- Native Go Interface: Command-line parsing with Go's flag package
- Message Callbacks: Go implementations of C callback functions
See golang/README.md for detailed Go usage instructions.
- C++11 compatible compiler
- raimd - Message decoding library
- raikv - Key-value and networking library
- libdecnumber - Decimal number library
- pcre2-8, libcares, pthread, rt libraries
# Build everything (libraries and programs)
make
# Debug build
make port_extra=-g
# Clean build
make cleanmake dist_rpm
### Running Tests
```bash
# Run the C RV7 test
./<os>_x86_64/bin/rv7_test
# Run subscription test
./<os>_x86_64/bin/subrv7test SUBJECT.TEST
# Run Go version
cd golang && ./subrv7test SUBJECT.TEST
Compatible with RV7 API:
// Transport and session management
tibrvTransport_Create(&transport, service, network, daemon);
tibrvEvent_CreateListener(&event, queue, callback, transport, subject, closure);
// Message handling
tibrvMsg_Create(&msg);
tibrvMsg_SetSendSubject(msg, subject);
tibrvMsg_AddString(msg, "field", value);
tibrvTransport_Send(transport, msg);High-performance native C++ interface:
// Event-driven client
EvRvClient client(poll, params);
client.connect();
client.subscribe(subject, callback);
// Publishing
client.publish(subject, msg_data, msg_len);Legacy RV5 compatibility:
rv_Session session;
rv_Init(&session, network, daemon);
rv_Listen(&session, subject, callback, closure);- Service: Port number (default: 7500)
- Network: Multicast address (default: system-dependent)
- Daemon: Daemon address (default: tcp:7500)
- RV: Native RV binary format
- TibMsg: TibMsg market data format
- SASS: SASS market data format
- JSON: Human-readable JSON format
- RWF: Reuters Wire Format
- Marketfeed: Reuters marktetfeed format
