[ 
https://issues.apache.org/jira/browse/QPID-4591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ernest Allen updated QPID-4591:
-------------------------------

    Attachment: bz691411.patch1

Adds mechanism to store and retrieve a queue level sequence number in message 
properties.

To enable storing of sequence numbers, declare queue with argument 
qpid.queue_msg_sequence set to user defined key.
To retrieve the sequence number from a message, get the message properties 
using the same user defined key.

std::string addr("my-queue;"
  " {create:always, delete:always,"
  " node: {type: queue, x-declare: {arguments:"
  " {qpid.queue_msg_sequence:my_seq_key, qpid.policy_type:ring, 
qpid.max_count:4}}}}");

Sender sender = session.createSender(addr);

... 

Receiver receiver = session.createReceiver("my-queue");

Message response = receiver.fetch();
uint32_t seqNo = response.getProperties()["my_seq_key"];
if (seqNo - lastSeqNo > 1) 
 //Gap detected. Messages were overwritten
  ...
                
> mechanism to detect when messages are overwritten in ring-type queues
> ---------------------------------------------------------------------
>
>                 Key: QPID-4591
>                 URL: https://issues.apache.org/jira/browse/QPID-4591
>             Project: Qpid
>          Issue Type: New Feature
>          Components: C++ Broker
>    Affects Versions: 0.18
>            Reporter: Ernest Allen
>             Fix For: Future
>
>         Attachments: bz691411.patch1
>
>
> A way to determine when a ring queue is full and old messages are being 
> deleted. Also need a way to determine when the ring queue is no longer full.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to