[rabbitmq-discuss] Draft of C++ rabbitMq API
Tony Garnock-Jones
tonyg at lshift.net
Thu Mar 4 20:23:12 GMT 2010
Alexandre Kalendarev wrote:
> participate in the Open Source project is best practics to improve the coding style.
That sounds about right :-)
> Do You reviw my PHP rabbit interface
> ( http://code.google.com/p/php-rabbit )? Is it more friendly interface?
Ah, I think I see the motivation for the style now. If it were me, I'd
be going for overloaded constructors in C++, all of which take at least
the name of the exchange/queue, where the variants are:
- one which does no declare at all, and just lets you use the
resource;
- one which declares actively, with other parameters as specified; and
- one which declares passively, with other parameters as specified.
> I use the basic classes: AMQPConnect, AMQPQueue and AMQPExchange. But when I designed
> of the C++ Interfce, I think, that he should be closest to the AMQP standard.
> Could be to design of the PHP analogy?
I don't know. The AMQP standard uses the word "class" in a way that I
think is misleading. It seems to deal in terms of certain remote
*resources* of different *types*, but they do not feel like methods in
an object-oriented sense, no matter what the terms the spec uses :-)
> Tonny,
> Do You have the librabbitmq examples of the use the File&Stream AMQP methods?
> It is absent into C-library examples. It is need for design of the C++ interface.
I do not, no; the reason is that RabbitMQ does not implement File or
Stream, because their behaviour is not specified in the standard.
Because they have no specified behaviour, I can't see the use of them.
If other vendors implement them, they will be effectively implemented as
custom extensions; if they ever get standardised, we'll no doubt follow.
Regards,
Tony
More information about the rabbitmq-discuss
mailing list