Implementation:ArroyoSystems Arroyo Blackhole Connector
| Knowledge Sources | |
|---|---|
| Domains | Streaming, Connectors |
| Last Updated | 2026-02-08 08:00 GMT |
Overview
BlackholeConnector is a no-op sink connector that silently discards all data written to it, useful for benchmarking and testing Arroyo pipelines without external dependencies.
Description
The Blackhole connector implements the Connector trait with EmptyConfig for both profile and table types. It always reports itself as a sink-only connector with custom schemas enabled. The make_operator method constructs a BlackholeSinkFunc which accepts and discards all incoming record batches. The connector requires a schema to be provided but does not validate or transform it in any way. The test method always reports success immediately without performing any external connectivity checks.
Usage
Use BlackholeConnector when you need a data sink for performance benchmarking, pipeline testing, or as a placeholder during development where no external output is needed.
Code Reference
Source Location
- Repository: ArroyoSystems_Arroyo
- File: crates/arroyo-connectors/src/blackhole/mod.rs
Signature
pub struct BlackholeConnector {}
impl Connector for BlackholeConnector {
type ProfileT = EmptyConfig;
type TableT = EmptyConfig;
fn name(&self) -> &'static str; // returns "blackhole"
fn metadata(&self) -> arroyo_rpc::api_types::connections::Connector;
fn table_type(&self, _: EmptyConfig, _: EmptyConfig) -> ConnectionType; // always Sink
fn get_schema(&self, _: EmptyConfig, _: EmptyConfig,
s: Option<&ConnectionSchema>) -> Option<ConnectionSchema>;
fn from_config(&self, id: Option<i64>, name: &str, config: EmptyConfig,
table: EmptyConfig, s: Option<&ConnectionSchema>) -> anyhow::Result<Connection>;
fn make_operator(&self, _: EmptyConfig, _: EmptyConfig,
_: OperatorConfig) -> anyhow::Result<ConstructedOperator>;
}
Import
use arroyo_connectors::blackhole::BlackholeConnector;
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| schema | ConnectionSchema | Yes | Schema definition for the data being discarded |
Outputs
| Name | Type | Description |
|---|---|---|
| (none) | -- | All data is silently discarded |
Usage Examples
CREATE TABLE blackhole_sink (
value TEXT
) WITH (
connector = 'blackhole'
);