pub trait PollingConsumer: Send + Sync {
// Required method
fn receive(&self) -> Result<Option<Exchange>, CamelError>;
}Expand description
A polling consumer receives messages on demand (pull model) rather than being event-driven (push model).
Implement this trait on endpoints that support synchronous pull-based
consumption (e.g., file, FTP, JMS). Components that are purely
event-driven (e.g., HTTP server, Kafka) can leave the default
Endpoint::polling_consumer returning None.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".