Open HerbertKoelman opened 11 years ago
Added two methods instead:
The first method set flags and value of corrid. Meaning that all subsequent calls to dequeue will try to dequeue only message having the last set corrid.
A usage sequence would be:
Buffer buffer ;
// set fields in buffer
Queue q ("QUEUE");
q.set_new_corrid(); // Correlation is set into QCTL structure
q.enqueue ( buffer ); // enqueue message
q.dequeue ( buffer ); // retrieve message only if corrid is the one that was previously set
...
Maybe something like UUID or a combination made of.
When an instance is passes to a Queue instance than each message sent through Queue::enqueue will be tagged with a correids. This value is saved and will automatically used in Queue::dequeue calls.
Something like this: