Skip to main content
Complete code for a small sample of a consumer pipeline of Stellar network ledger metadata using the Stellar Go Ingest SDK to demonstrate data pipeline from ledger metadata to derived data model with event-driven, distributed processing to sample microservice (Python script) as subscriber. This example uses the ZeroMQ goczmq Go wrapper SDK, which requires a few o/s dependent libraries to also be installed on the host machine. This example requires having access to a public ledger metadata lake that is actively populated with latest ledgers from Stellar mainnet. For purposes of the example it uses a reference data lake hosted on AWS Open Data S3

Step# 1 - Create example directory and copy following files to your workstation.

main.go

config.toml

The CDP configuration settings, this file defines the data storage which contains the pre-generated Ledger Metadata files. The S3 Public Blockchain bucket for Stellar Pubnet is used in this example.

distributed_payment_subsciber.py

A Python script demonstrating how we now have distributed processing and event driven architecture by leveraging the MQ Broker to push derived application payment data model out to other microservices. Make sure to pip install pyzmq

Step# 2 - Compile and run the ingestion pipeline example.

Step# 3 - Run the distributed pipeline consumer

In separate terminal, run python distributed_payment_subsciber.py, this will perform distributed pipeline topology, as it receives messages with payment info from the pipeline process and does additional processing(printing it to console).