[rabbitmq-discuss] SimpleRpcServer send generated queue name to client
Tony Garnock-Jones
tonyg at lshift.net
Wed Mar 3 23:20:27 GMT 2010
Hi,
glenner wrote:
> And, more general, is this a valid design using RabbitMQ/AMQP? I'm still new
> to RabbitMQ/AMQP so maybe i overlooked a more approriate way to do this..
It sounds reasonable; but it might be possible to leverage the features
of the RabbitMQ server even more than you have in mind.
For example, could it work to design a topic hierarchy for your system's
events, and then simply use an AMQP topic exchange to broadcast them to
the correct consumers?
The application-level server would then blindly send events, with an
appropriate routing key, to a named exchange it had set up, and the
clients would create private queues (using queueDeclare()) and bind them
(using queueBind()) to the exchange with appropriate binding key for
selecting the subset of events they are interested in. There need then
be no direct communication between the clients and the application-level
server.
You mentioned there were custom filter predicates. These are a potential
missing piece. If the event types don't fit nicely onto the routing keys
usable with topic exchanges, then you will be relying on client-side
filtering, which may or may not be suitable for your application. On the
other hand, if routing keys and a topic exchange get you 99% of the way
there, then the remaining small amount of filtering can easily be done
on the client side. A final option would be to implement a custom
exchange type which is capable of understanding your filter predicates
within the AMQP server itself.
Regards,
Tony
More information about the rabbitmq-discuss
mailing list