2 Replies Latest reply on May 24, 2006 4:53 AM by timfox

    Flawed deliver() semantics

    timfox

      The operation Channel::deliver(Receiver r) synchronously delivers a reference to the receiver.

      I.e. it serves exactly the same purpose as a method MessageReference receive() it's just a long winded way of doing the same thing.

      This is all works ok on a single node, but when we consider a clustered case where we have the "active" queue on node A, and the receiver on node B, then it still works but it's inefficient since we would require one network RPC for the deliver() and another for the invocation of handle() on the receiver.

      Proposal is to get rid of deliver(Receiver r) on the channel and replace with MessageReference receive().

      As a side effect this should also simplify ServerConsumerDelegate code since we're not having to jump through hoops when all we want to do is a simple receive() anyway.

        • 1. Re: Flawed deliver() semantics
          ovidiu.feodorov

          MessageReference.receive()? What does a MessageReference have to do with Channel delivery? The MessageReference is being delivered, how would you call receive() on something that isn't in the Receiver yet?

          I am obviously misunderstanding this, could you please elaborate a little bit more?

          • 2. Re: Flawed deliver() semantics
            timfox

            You didn't notice the space :)

            Not MessageReference.receive(), MessageReference receive(), i.e. it's a method on the Channel that returns a MessageReference, explicitly MessageReference Channel::receive().