So, I'm trying to create a simple app that would do 4 things.
1) get a list of consumers ( if I can get those that registered .. maybe I can name them somehow when they join so it's dynamic ).
2) send a "message" to one random consumer and display the result
3) send a "message" to one specific consumer ( got from the list above or maybe a predefined list ) and display the result
4) send a "message" to all consumers and display the results as they come from each one.
The app is done in php with php-amqplib (https://github.com/videlalvaro/php-amqplib) . The rabbitmq is up and running and seems to work ( tried the tutorials ).
The documentation for the amqp lib for me is a bit weird so what I'd greatly appreciate would some lines of example code and description of the params used.
1) can be solved by using rabbitmq's management /api/queues by naming each consumer with a persistent queue name for itself.
2,3,4, got solved like this:
...
...
...
Not sure this is the best way but it got my "hello world" going.