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

Any chance to start worker without pointing the workerMap? #225

Open
alewkinr opened this issue Oct 3, 2023 · 3 comments
Open

Any chance to start worker without pointing the workerMap? #225

alewkinr opened this issue Oct 3, 2023 · 3 comments

Comments

@alewkinr
Copy link

alewkinr commented Oct 3, 2023

Hey there!

I’m trying to implement a generic jobType consumer with this library, but i met an issue. It is requried to define the jobType while creating the workerPool.

Is there any chance, how i can solve my problem?

@vgarvardt
Copy link
Owner

it is not possible by design, every job type must have explicitly defined handler

if you need something like generic job type - you can use the same one for all jobs and then implement your own routing based on the job arguments

@alewkinr
Copy link
Author

alewkinr commented Oct 4, 2023

That is actually what I want. I need a consumer which read any message in the queue and can handle different types of them. in this handler.

Do you think it might be useful for this library if I can prepare a pr?

@vgarvardt
Copy link
Owner

added an option to set a handler for unknown job types in #227 - is it something like this that you want?

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