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

How to develop a consumer ? #597

Open
alissonpadua opened this issue Aug 2, 2024 · 3 comments
Open

How to develop a consumer ? #597

alissonpadua opened this issue Aug 2, 2024 · 3 comments
Assignees

Comments

@alissonpadua
Copy link

  • Laravel: 11
  • RabbitMQ version: 3.13
  • Package version: latest

Hello everyone! I hope you're doing well!! I have 2 laravel apps, one producing data (via Job) and another one I would like to consume data from the queue whenever it has messages there (also ack the message). The producer I manage to make it works following the docs, but the consumer I didn't unfortunately. Do you have any example of a consumer ? It can use event, jobs, listerners I don't mind =))

Thank you!!

@mrrezakarimi99
Copy link

Hi @alissonpadua, I hope you are doing well. Could you please send the error message from the second application that is consuming queues? I believe I can assist you with this situation.

@alissonpadua
Copy link
Author

Hi @alissonpadua, I hope you are doing well. Could you please send the error message from the second application that is consuming queues? I believe I can assist you with this situation.

Actually there is no error, I'm just not sure the best way to implement it. Maybe that is not the pourpose of the lib ?

@khepin
Copy link
Collaborator

khepin commented Aug 7, 2024

This library implements the same interfaces as all Laravel queue implementations. This means the documentation to be followed is the one from Laravel.
Note that Laravel serializes and de-serializes job classes so you'll need to have the same code (same job class) in both applications for your use case.

I would also suggest using the rabbit admin UI to validate that your messages are correctly being sent to the queue

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

4 participants