consumer
Binding-scoped Kafka consumption, with and without group coordination.
The import binding is the consumer capability: it fixes the Kafka identity and client policy before execution. The returned resource remains explicit because it owns real session state — group membership, assignment, cursor, paused partitions, streams and shutdown — and several resources opened from one binding are distinct members of its configured group.
Every function is async
Including the ones that only read local state —
assignment, position — which is not how they would be written for a native
implementation. A host component plugin's capabilities are installed on a
caller's linker as concurrent host functions, and a sync func fails to bind
there with "type mismatch with async". One sync function is therefore enough
to make the whole interface unservable from a component, and this package's
host-plugin world describes exactly that deployment. An async lift costs a
native implementation nothing — the body returns without suspending — so this
is the version that both kinds of provider can serve.