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

Improve api to help in extending #29

Open
geofmureithi opened this issue Jun 8, 2023 · 2 comments
Open

Improve api to help in extending #29

geofmureithi opened this issue Jun 8, 2023 · 2 comments

Comments

@geofmureithi
Copy link

Part of the API esp in mq-surreal can be refactored to help in building lib's on top of it eg.

pub struct SurrealProducer {
db: Arc<Surreal<Any>>,
table: String,
}

Some of my goals is to use the methods provided to do so eg:
async fn publish(&self, job: Job) -> Result<(), Error> {

Specifically I want to work with this for apalis to close issue geofmureithi/apalis#22
Apalis introduced a message queuing trait in 0.4.

One problem I am facing is, you use a concrete type Job while apalis uses a generic JobRequest<T>, so it may be hard to integrate without some changes.

My main goal here is not to do the same implementation elsewhere when I don't necessarily use SurrealDb yet you already have a maintained crate here 😄.

@prabirshrestha
Copy link
Owner

I consider mq at a very early stage. I still haven't finished designing the apis and adding features so I expect it to continue to break in the future.

Is depending on producer trait not enough?

As for concrete job type you can always create your own and convert it to mq job type.

More than happy to continue to get feedback and make necessary changes.

@geofmureithi
Copy link
Author

geofmureithi commented Jul 11, 2023

As for concrete job type you can always create your own and convert it to mq job type.

Let me look at this and get back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants