> -----Original Message-----
> From: Gordon Sim [mailto:[email protected]]
> Sent: Thursday, September 10, 2009 11:06 AM
> To: [email protected]
> Subject: Re: [c++] latest messaging api patch
>
> On 09/10/2009 05:35 PM, Alan Conway wrote:
> > Given a choice between:
> >
> > message.getSession().reject(message)
> > message.reject()
> >
> > the latter seems simpler, more intuitive and less error prone. Why
> > complicate the API because of the way the implementation works?
>
> My personal preference is still for Session::reject(const Message&),
> with the requirement that the message has been received on that session
> (and not previously acknowledged) made very clear in the documentation.

Alan's suggestion is my preference.  APIs should be designed to be difficult, 
if not impossible, to use incorrectly.  The conciseness of Alan's suggested API 
is also a virtue.

Otherwise, what would be the behavior if the wrong session is asked to reject 
the message?  And what overhead does that entail?


This e-mail and files transmitted with it are confidential, and are intended 
solely for the use of the individual or entity to whom this e-mail is 
addressed. If you are not the intended recipient, or the employee or agent 
responsible to deliver it to the intended recipient, you are hereby notified 
that any dissemination, distribution or copying of this communication is 
strictly prohibited. If you are not one of the named recipient(s) or otherwise 
have reason to believe that you received this message in error, please 
immediately notify sender by e-mail, and destroy the original message. Thank 
You.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to