SaturnX
  • WELCOME
    • ☀️What is Saturnx?
    • Pricing with Rate limits
      • Prepaid Credits
      • Pay with Crypto
  • RPC Nodes
    • RPCs Overview
  • BLOCKCHAIN
    • Overview
    • HTTP
      • getHistoryCandleStick
      • getHistoryTransaction
      • getAccountTnx
      • getAccountTnxByToken
      • getHoldersTop
      • getHotPairs
      • getTokenSecurity
    • WebSocket
      • {blockchain}.broadcast.transactions
      • {blockchain}.broadcast.kline
    • Kafka
Powered by GitBook
On this page
  • Subscription Overview
  • Configuration
  1. BLOCKCHAIN

Kafka

This document explains how to subscribe to {blockchain} transactions using Kafka, ensuring a consistent data stream.


Subscription Overview

Both Kafka and WebSocket use the same topic structure to ensure consistency. The topic format follows:

Topic For example:

  • {blockchain}.broadcast.transactions → solana.broadcast.transactions

Kafka Subscription Process

The complete steps for subscribing to {blockchain} transactions in Kafka are as follows:

  1. Create Kafka Configuration

  • Set the bootstrap.servers address

  • Configure security authentication (SASL/SSL)

  • Specify the group.id to ensure consumer group management

  1. Subscribe to {blockchain} Transaction Topics

  • Topic format: solana.broadcast.transactions

  1. Start Consuming Data

  • Poll Kafka for the latest transaction data

  • Parse and process transaction information

  1. Data Processing Logic

  • Record key information such as transaction hash, sender, receiver, and amount

Configuration

Property
Value
Description

BOOTSTRAP_SERVERS_CONFIG

"kf01.saturnx.dev:9093"

Kafka broker address

GROUP_ID_CONFIG

"consumer-group-1"

Consumer group name

AUTO_OFFSET_RESET_CONFIG

"latest"

Starts consuming from the latest record

security.protocol

"SASL_SSL"

Enables secure authentication

sasl.mechanism

"PLAIN"

Authentication method

sasl.jaas.config

"username="" password="";"

User credentials for authentication

ssl.truststore.location

"kafka.truststore.jks"

Truststore file for SSL verification

ssl.truststore.password

"96286190"

Password for the truststore

Previous{blockchain}.broadcast.kline

Last updated 1 month ago

kafka.truststore.jks

Click to download