[rabbitmq-discuss] AMQP library APIs

Michael Klishin mklishin at gopivotal.com
Thu Aug 8 14:58:18 BST 2013


Alan Antonuk:

> That makes me wonder what is it that developers use channels for?  My understanding is they're were designed to be an 'error scope' at a protocol level. I don't see a lot of developers using them that way, and sometimes its the source of a bit of pain (having to recreate any resources that get destroyed as a result of a channel exception, or in bad cases, their whole app aborts because the channel dies).

For separating things that may require different error handling.

> My thinking is that an API could be created that internally uses channels intelligently to give more native feel to error handling. One example of changing the API might be: instead of apply basic.qos to a channel, you apply it to a consumer, and internally the library maps a consumer to a channel, so a BasicQos on a consumer.  The same can be done for other aspects of the protocol (this is what I ended up doing with SimpleAmqpClient).  A downside being the API may not map 1:1  to a lot of the documentation that is out there.

Nearly every other client exposes basic.qos on a channel, not a consumer. Not doing the same
will likely only cause more confusion at this point, not less.
--
MK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130808/df24f887/attachment.pgp>


More information about the rabbitmq-discuss mailing list