| Crates.io | carbon-stream-message-datasource |
| lib.rs | carbon-stream-message-datasource |
| version | 0.12.0 |
| created_at | 2025-11-27 05:19:41.909825+00 |
| updated_at | 2025-11-27 05:19:41.909825+00 |
| description | Stream Message Datasource |
| homepage | |
| repository | https://github.com/sevenlabs-hq/carbon |
| max_upload_size | |
| id | 1953088 |
| size | 89,822 |
A generic and extensible datasource for the indexing framework that consumes a unified stream of account and transaction messages from any source.
StreamMessageDatasource provides an abstract interface for feeding real-time or batch data into Carbon, decoupled from any specific transport or plugin implementation.
It is designed to handle incoming messages like:
pub enum UnifiedMessage {
Account(AccountUpdate),
Transaction(Box<TransactionUpdate>),
}
This enables integration with various upstreams such as:
handle_message_streamDatasource traitsolana-* crates (~2.3 compatible)use carbon_core::{datasource::Datasource, types::Update};
use carbon_stream_message_datasource::{StreamMessageDatasource, UnifiedMessage};
let (sender, receiver) = tokio::sync::mpsc::channel(100_000);
let datasource = StreamMessageDatasource::new(receiver);
pipeline.register(Box::new(datasource));
Send messages into the channel from any source:
sender.send(UnifiedMessage::Account(account_update)).await?;
sender.send(UnifiedMessage::Transaction(Box::new(tx_update))).await?;
Use StreamMessageDatasource when you: