This directory contains a Docker-based implementation of the SCGPS telemetry data sinker for Microsoft SQL Server. The service consumes telemetry events from Kafka and stores them in MSSQL database.
docker-compose.yaml-sample to docker-compose.yaml
docker-compose.yaml-sample from the official repository:
examples/mssql_sinker_docker on GitLabdocker-compose.yamldocker-compose up -d
The image can be pinned by tag or digest (for example scgps/scgps-mssql-sinker:2.1.0) for deterministic deployments.
| Parameter | Description | Source | Required |
|---|---|---|---|
KAFKA_BOOTSTRAP_SERVERS | Kafka broker endpoints | Provided by SCGPS | Yes |
KAFKA_SASL_USER | SASL authentication username | Provided by SCGPS | Yes |
KAFKA_SASL_PASS | SASL authentication password | Provided by SCGPS | Yes |
KAFKA_CONSUMER_GROUP_ID | Consumer group identifier | User defined | Yes |
KAFKA_PARTNER_TOPIC_LIST | Comma-separated list of topics to consume | Provided by SCGPS | Yes |
KAFKA_PROVIDER | Kafka endpoint trust source: aws, ovh, or none | Provided by SCGPS | No, omit for default trust |
KAFKA_SSL_CA_LOCATION | Path to an operator-mounted CA file (mount it into the container); overrides the packaged CA | Operator supplied | No |
The Kafka connection uses SASL_SSL security protocol with SCRAM-SHA-512 mechanism. The client verifies the broker certificate and hostname on every supported endpoint. An invalid KAFKA_PROVIDER value causes an error before any connection is attempted. Provider selection (KAFKA_PROVIDER) is available on the Python consumer path only.
Recommended upgrade flow: upgrade the image first with unchanged environment variables (behavior unchanged), then switch endpoints later by updating KAFKA_BOOTSTRAP_SERVERS, KAFKA_SASL_PASS, and KAFKA_PROVIDER.
This sinker performs no consumer-group offset migration; transferring group positions between clusters is subject to separate coordination.
| Parameter | Description | Default | Required |
|---|---|---|---|
KAFKA_BATCH_SIZE | Number of events to process in a batch | 5000 | No |
KAFKA_MAX_WAIT_IN_SEC | Maximum wait time for batch completion | 5 | No |
KAFKA_EVENT_UNMARSHALLER_THREAD_POOL_SIZE | Thread pool size for event processing | 5 | No |
You can filter events using one of the following methods (it is recommended to avoid using multiple filters simultaneously, but it is possible.):
Drop List - Filter out specific event types:
KAFKA_EVENT_DROP_LIST: "CustomerSpecEvent,FileStreamEvent"
Keep List - Process only specific event types:
KAFKA_EVENT_KEEP_LIST: "GPSPositionTelemetry,ExternalInputEvent"
Plate Number Filter - Process events only from specific vehicles:
KAFKA_EVENT_KEEP_PNUM_RID_LIST: "ABC-123,DEF-456"
For a complete list of event types, refer to the default event parser configuration.
| Parameter | Description | Required |
|---|---|---|
MSSQL_HOSTNAME | SQL Server hostname | Yes |
MSSQL_PORT | SQL Server port (default: 1433) | Yes |
MSSQL_USERNAME | SQL Server username | Yes |
MSSQL_PASSWORD | SQL Server password | Yes |
MSSQL_DATABASE | Database name | Yes |
MSSQL_ODBC_DRIVER | ODBC Driver name (default: "ODBC Driver 18 for SQL Server") | Yes |
MSSQL_ODBC_ADDITIONAL_CONFIG_LIST | Additional ODBC configuration parameters (comma-separated) | No |
The service requires two schemas in the database:
iot_telemetry - Raw telemetry events (INSERT only)iot_aggregates - Aggregated data (full CRUD operations)Database Connection Issues
TrustServerCertificate setting if using SSLKafka Connection Issues
Performance Issues
KAFKA_BATCH_SIZE and KAFKA_MAX_WAIT_IN_SECFor additional support or questions about:
Content type
Image
Digest
sha256:526e4229e…
Size
428.6 MB
Last updated
about 1 month ago
docker pull scgps/scgps-mssql-sinker