camel-component
Component trait and registry for rust-camel
Overview
camel-component defines the core Component, Endpoint, Consumer, and Producer traits that all rust-camel components must implement. This crate provides the foundation for creating new components that can integrate with the rust-camel routing engine.
If you're building a custom component (e.g., for a proprietary protocol or service), you'll implement the traits defined in this crate.
Features
- Component trait: Factory for creating endpoints from URIs
- Endpoint trait: Represents a communication endpoint with consumer/producer support
- Consumer trait: Consumes messages from external sources
- Producer trait: Sends messages to external destinations
- Concurrency support: Built-in support for concurrent message processing
Installation
Add to your Cargo.toml:
[]
= "0.2"
Usage
Implementing a Custom Component
use ;
use ;
;
Core Types
| Trait | Description |
|---|---|
Component |
Factory for creating endpoints |
Endpoint |
Communication endpoint (consumer/producer) |
Consumer |
Receives messages from external systems |
ProducerContext |
Context for creating producers |
Documentation
License
Apache-2.0
Contributing
Contributions are welcome! Please see the main repository for details.