Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add async stream consumer method to EventConsumer #1552

Closed
jeremymv2 opened this issue Dec 2, 2020 · 2 comments
Closed

add async stream consumer method to EventConsumer #1552

jeremymv2 opened this issue Dec 2, 2020 · 2 comments
Labels

Comments

@jeremymv2
Copy link
Contributor

/// Trait abstraction representing the configured Event Consumer. The Consumer is
/// responsible for reading messages off of the message bus.
pub trait EventConsumer {
/// Subscribe to list of queues or topics
fn subscribe(&self, queues: &[&str]) -> Result<(), Error>;
/// Poll the topic(s) for new messages. When a message exists, its payload will be returned.
/// This is a synchronous call.
fn poll(&self) -> Option<Result<String, Error>>;
// TODO (JM): Add an async stream consumer method, perhaps `consume_stream` or similar.
// An example of a Kafka implementation of this is implemented via `StreamConsumer` [1].
// [1] https://github.com/fede1024/rust-rdkafka/blob/master/src/consumer/stream_consumer.rs
}

@stale
Copy link

stale bot commented Dec 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Dec 2, 2021
@stale
Copy link

stale bot commented Jan 8, 2023

This issue has been automatically closed after being stale for 400 days. We still value your input and contribution. Please re-open the issue if desired and leave a comment with details.

@stale stale bot closed this as completed Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant