Skip to content

@lastshotlabs/slingshot-kafka

npm install @lastshotlabs/slingshot-kafka

Broker metadata attached to one inbound Kafka message after normalization.

function createInMemoryDedupStore(options: { maxKeys?: number } = {}): MessageDedupStore

Source: packages/slingshot-kafka/src/kafkaConnectors.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

function createKafkaAdapter(rawOpts: KafkaAdapterOptions & EventBusSerializationOptions & { /** * Optional metrics sink. When provided, the adapter records publish / * consume / dlq counters, publish/consume durations, and pending-buffer * + connection-state gauges so operators can wire ad-hoc dashboards * without log scraping. Defaults to a no-op emitter. */ metrics?: MetricsEmitter; /** * Optional structured logger. Defaults to a console-backed JSON * logger when omitted. All warn/error paths route through the logger * so no structured information is lost to console formatting. */ logger?: Logger; },): SlingshotEventBus &

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Broker metadata attached to one inbound Kafka message after normalization.

function createKafkaConnectors(rawOpts: KafkaConnectorsConfig & { /** * Optional metrics sink. When provided, the connector records publish / * consume / dlq counters and durations alongside the existing * observability hooks. Defaults to a no-op emitter. */ metrics?: MetricsEmitter; },): KafkaConnectorHandle

Source: packages/slingshot-kafka/src/kafkaConnectors.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

function getKafkaAdapterIntrospectionOrNull(bus: SlingshotEventBus,): KafkaAdapterIntrospection | null

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

FieldDescription
autoCreateTopicsWhether to automatically create topics that do not yet exist on the broker
brokersList of Kafka broker addresses to connect to
clientIdKafka client identifier for this adapter instance
compressionCompression codec applied to produced messages (e.g. gzip, snappy, lz4)
connectionTimeoutMilliseconds to wait for the initial broker connection before timing out
defaultPartitionsDefault number of partitions when auto-creating topics
groupPrefixPrefix prepended to all consumer group IDs created by this adapter
heartbeatIntervalInterval in milliseconds between consumer heartbeats to the group coordinator
maxRetriesMaximum number of retries for failed produce or consume operations
replicationFactorReplication factor used when auto-creating topics
requestTimeoutMilliseconds to wait for a broker request response before timing out
saslSASL authentication configuration for the Kafka connection
sessionTimeoutConsumer session timeout in milliseconds; triggers a rebalance if exceeded
sslTLS/SSL configuration for the Kafka connection
startFromBeginningWhether new consumer groups start reading from the earliest available offset
topicPrefixPrefix prepended to all topic names produced or consumed by this adapter
validationEvent payload validation mode: strict rejects, warn logs, off skips validation

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Broker metadata attached to one inbound Kafka message after normalization.

FieldDescription
`/** Override the default inbound dedup TTL (1h). Set to 0 to disable dedup. */
dedupTtlMs`Override the default inbound dedup TTL (1h); set to 0 to disable dedup
brokersList of Kafka broker addresses for the connector bridge
clientIdKafka client identifier for this connector bridge instance
compressionDefault compression codec applied to produced messages across all connectors
drainIntervalMsInterval in milliseconds between pending buffer drain attempts
hooksObservability hooks for monitoring inbound and outbound connector activity
inboundArray of inbound connector definitions consuming from Kafka topics
maxProduceAttemptsMaximum number of produce attempts before a buffered outbound message is dropped
saslSASL authentication configuration for the connector Kafka connection
serializerDefault serializer used for all connectors unless overridden per connector
sslTLS/SSL configuration for the connector Kafka connection
validationModeDefault payload validation mode applied to all connectors unless overridden

Source: packages/slingshot-kafka/src/kafkaConnectors.ts

Convert a Slingshot event key to a Kafka topic name.

The event’s : separators are replaced with . (preserving the namespace convention) and the prefix is prepended verbatim. Inputs that contain Kafka-illegal characters or consecutive colons are passed through; callers are responsible for keeping event names well-formed (use defineEvent and the namespace:resource.action convention).

function toGroupId(prefix: string, topic: string, name: string): string

Source: packages/slingshot-kafka/src/kafkaTopicNaming.ts

Convert a Slingshot event key to a Kafka topic name.

The event’s : separators are replaced with . (preserving the namespace convention) and the prefix is prepended verbatim. Inputs that contain Kafka-illegal characters or consecutive colons are passed through; callers are responsible for keeping event names well-formed (use defineEvent and the namespace:resource.action convention).

function toTopicName(prefix: string, event: string): string

Source: packages/slingshot-kafka/src/kafkaTopicNaming.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Errors thrown by the Kafka event bus adapter and connector bridge.

Source: packages/slingshot-kafka/src/errors.ts

Broker metadata attached to one inbound Kafka message after normalization.

Source: packages/slingshot-kafka/src/kafkaConnectors.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Broker metadata attached to one inbound Kafka message after normalization.

Source: packages/slingshot-kafka/src/kafkaConnectors.ts

Broker metadata attached to one inbound Kafka message after normalization.

Source: packages/slingshot-kafka/src/kafkaConnectors.ts

Broker metadata attached to one inbound Kafka message after normalization.

Source: packages/slingshot-kafka/src/kafkaConnectors.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Reasons the adapter may drop or skip an event. Surfaced through onDrop so SREs can wire metrics and alerts without log scraping.

Source: packages/slingshot-kafka/src/kafkaAdapter.ts

Broker metadata attached to one inbound Kafka message after normalization.

Source: packages/slingshot-kafka/src/kafkaConnectors.ts

Broker metadata attached to one inbound Kafka message after normalization.

Source: packages/slingshot-kafka/src/kafkaConnectors.ts