On 09/10/2009 10:22 AM, Rafael Schloming wrote:
Gordon Sim wrote:
On 09/09/2009 10:21 PM, Alan Conway wrote:
I just went over the messaging API on trunk, I scribbled some comments
on it diff attached.

Thanks, Alan, all good points!

First, the easiest point to address, Session::getLastConfirmedSent()
and Session::getLastConfirmedAcknowledged() should no longer be in
there (part of an aborted earlier approach) and I'll remove them.

* Session::reject(Message&) -> Message::reject()

I wasn't keen on this, but I can't really justify my dislike so I'll
go ahead and make that change.

I'm not a fan of this change either. As with acknowledge, reject is
really an operation on the state that the session holds about a given
message, not an operation on the message itself, so I find it a bit
incongruous to have reject on the Message.


Acknowledge acks all messages received by the session to date so its clearly a session operation.

Reject is an operation on a specific message. It is implemented as an update to the session state, but from the users perspective you reject a message. Moreover its only legal to reject a message using the session that it arrived on.

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?

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

Reply via email to