-
Notifications
You must be signed in to change notification settings - Fork 36
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
Creating & sending to queue #43
Comments
Hello Hannan, I only skimmed over this for now (late night here in SF, CA). Could you provide a very basic code example of what you are describing. I can definitely help you out with this tomorrow, and we can see what needs to be added to coworkers (features or better documentation) Typed using my thumbs..
|
Hannan, Just checked this out again. I think I understand what you are describing, but a code example would help me understand the scenario better. Thanks |
Hello @delveintechnolabs, If I understand correctly you are looking for an api to publish jobs to rabbitmq from a non-consumer application? If that it is the case you can just use amqplib. If you are wanting a RPC api checkout amqplib-rpc. Does that answer your question? |
Hello Tejas, Thanks for your reply and taking time to dig into this problem. Also, apologies for such a late reply somehow these email notifications went overlooked. Well in a nut shell, there are 2 main players
Now, what I want is tell 1 from 2 that a message has been processed i.e. When a particular consumer is done processing a message, I want to publish a message in another queue(which I don't want to create consumer for, so I won't do app.queue() because I want my node app I.e. 1 to consume this queue) (In bed while typing this with thumbs :-) , I'll explain better in a graphical representation tomorrow) Thanks, Sent from my iPad
|
Actually this explanation is great and what I assumed from your last explanation. Coworkers uses 'amqplib' under the hood, this library is great for publishing and only lacks easy rpc methods. I created 'amqplib-rpc' to make rpc easier, which coworkers also uses under the hood. Coworkers was designed specifically for consumer applications. I believe currently, if you start coworkers without a queue it will throw an error. The only convenience that coworkers could provide to a publishing app is to quickly create both a rabbitmq connection and channel (which I don't think is that useful). I will provide you with a short example of using amqplib for publishing a little later |
|
Hi,
I have been using this module since a long while. My whole workers app is using the co-workers as base. It is very useful and suffice my needs for creating queue consumer. But when it comes to become publisher, its a bit pain.
I am aware that i can use the context to use publisher channel to publish a message to a queue. But the problem arrives when i have a queue for which i dont want to create a consumer in this app but in other app(in other words i want this app to act as a producer in some situations)
For e.g.: I have two queues
startWorking
anddoneWorking
my node application will send a message tostartWorking
when it has a task. what i want to essentially do is put a message indoneWorking
when a message instartWorking
is processed by consumer(my node app i.e. the producer of message instartWorking
will become consumer ofdoneWorking
)For this i need to consume
startWorking
and also create a queuedoneWorking
but not consume itThe main aim of above mechanism is two way communication channel.
The problem is that, co-workers lack on info and documentation as a publisher/producer. Can you please guide me on how this would be possible using co-workers.
I would be really greatfull for your help and reply
Thanks
Hannan
The text was updated successfully, but these errors were encountered: