A comment on the following in Gordon's last proposal:

    virtual void submitEnqueue(MessageHandle*, DataSource*, QueueHandle*, 
TxnHandle*, ResultCallback*, BrokerContext*) = 0;
    virtual void submitDequeue(MessageHandle*, TxnHandle*, ResultCallback*, 
BrokerContext*) = 0;

If the MessageHandle is the handle to a message, then assuming it can be
enqueued on more than one queue, I believe it is insufficient to dequeue
that message without also supplying a queue context.

In my v.2 proposal, I created the idea of an enqueueHandle, being the
context of a specific enqueue, and implicitly includes information on
which queue was the target of the enqueue op. This will allow the
dequeue op to accept only the enqueueHandle, and have all the necessary
information to persist the dequeue. However, this strips the store of
any idea of message identity (all enqueue ops are treated as opaque
binary blobs), and precludes the ability to optimize storage based on
the fact that a single message may be enqueued on multiple queues.

For this reason, the v.2 proposal also included a separate MessageHandle
which provides additional message context, and if the store is able, it
may optimize the storage for cases where a message has been previously
enqueued.

Here are the options on this point:

1. Only message context:

virtual void submitEnqueue(MessageHandle*, DataSource*, QueueHandle*, 
TxnHandle*, ...) = 0;
virtual void submitDequeue(MessageHandle*, QueueHandle*, TxnHandle*, ...) = 0;

2. Message and Enqueue context:

virtual void submitEnqueue(EnqueueHandle*, MessageHandle*, DataSource*, 
QueueHandle*, TxnHandle*, ...) = 0;
virtual void submitDequeue(EnqueueHandle*, TxnHandle*, ...) = 0;

It might also be suggested that the DataSource itself contained some
notion of identity which the store could supply, it would suffice as the
MessageContext and allow the broker to recognize it in various enqueue
operations.


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

Reply via email to