Open anedisi opened 8 years ago
Sorry for the late reply, was on vacation.
Not sure if I understood it correctly, do you want to create a queue which contains messages of multiple routing keys?
Regarding the RPC, I've already played around with it but hadn't time to merge it into the repo.
yes i wanted to bind a queue to multiple routing keys. that was fairly easy to implement. also the ability to "subscribe" to some routing keys.
i have created the "listener". the listener is basically this https://www.rabbitmq.com/tutorials/tutorial-five-python.html
sorry i have already implemented those and rpc in my project.
I think it would be nice to create a way to consume more than one "routing_key".
Something like this:
Amqp::listen(
['routing-warning-log', 'routing-error-log'],
$callback
);
We can find some examples here: https://www.rabbitmq.com/tutorials/tutorial-four-php.html https://www.rabbitmq.com/tutorials/tutorial-five-php.html
Have you added RPC support ?
@aqkhan #9
Consumer right now does not make to much sense for my use case. When im publishing new things i publish it to routing key.
i would like some API like this Amqp::listen('routing.key,other.key', callback)
this would generate new queue behind the scenes and consume those routing keys. with current setup i have to create new queue for every routing key and bind it to that routing key.
Also i needed the RPC so im implementing it.
i have something like this. $response = Amqp::rpc('routing.key');
and for a rpc listener the consumer/listener could be the same as in publish with a difference where in callback we would call something like $resolver->replay(...
right now i have forked and playing with it to suit my needs but i would like if we can implement something like this here so i dont have to keep a local copy of this i my project.