Operations / Operations

Public C Bridge SDK

Implement a target-compatible sink adapter, negotiate the installed ABI and let the bridge host own delivery policy.

Public ABI v3; v1/v2 compatibility

The public C Bridge SDK is available in every tier. Start with Build, the development skill or the complete C tutorial. The installed header and example package can be extracted without a product source checkout.

Installed package and ABI

Use /usr/local/include/nginz_iot/nginz_iot_bridge_sdk.h from the exact image. The current package supports ABI v3 with unchanged v1/v2 structures and entry points. ABI v1 provides a one-event lifecycle. ABI v2 adds bounded batches; v3 adds size-tagged structures, full event identity and a host-generated idempotency key. Batch limits are 32 events and 1 MiB.

The host negotiates the newest common ABI and validates size, capabilities and callbacks before initialization. Compile a shared library for the target CPU and libc with any compatible C toolchain outside the runtime image.

Lifecycle and ownership

negotiate → init → connect → send/send_batch → flush → drain → close

The adapter implements destination interaction and canonical results. Borrowed events/payloads have callback-scoped lifetimes. The bridge host owns bounded retry, backpressure, health, dead letters and durable replay when configured. Keep a single retry/side-effect owner and verify provider commitment.

Each target runs in an isolated worker supervised by the normal guardian. Trusted paths, safe metadata and an optional configured digest protect loading. The guardian does not load customer libraries. Treat all loaded native code as trusted; resource exhaustion can still affect the host.

Wire the package

Supply a target-compatible .so, worker configuration, guardian target and supported topic route. Preserve ring identities and container IPC/PID/network joins. Mount the library/configuration read-only and keep credentials as private references. Validate the actual native configs before starting selected roles.

Free keeps delivery state in memory; Pro and higher can select the durable PostgreSQL outbox. Max/Enterprise include the provider adapter catalog. The SDK boundary and customer-adapter ability remain available throughout.

Provider evidence and operation

Baseline profiles include PostgreSQL, HTTPS webhook and MQTT. The SDK catalog includes Kafka, Redis, ClickHouse, S3-compatible storage, InfluxDB, TimescaleDB and RabbitMQ/AMQP 0.9.1 with their scoped qualification. sample is a conformance utility; LoRaWAN downlink is a selected gateway workflow. Cloud IoT service links remain outside the packaged scope.

For your adapter, test exact delivery, duplicate/ambiguous outcomes, retry and terminal classifications, timeout, backpressure, worker restart, drain and selected durable recovery. Use the panel or API skill for redacted inspection and governed operations. Compilation alone supplies no provider qualification.

Implementation authority

This page is a customer-oriented guide. The source contract remains authoritative for exact behavior and release evidence.

src/processes/bridge/sdk/README.md