https://issues.apache.org/jira/browse/QPID-5116 raised for it. I already 
proposed a patch there, though not sure if it can't break anything..

Kind regards,
Pavel


----- Original Message -----
> From: "Alan Conway" <[email protected]>
> To: [email protected]
> Cc: "Pavel Moravec" <[email protected]>
> Sent: Wednesday, September 4, 2013 4:09:20 PM
> Subject: Re: QMF method "queueMoveMessages" can loose one message
> 
> On 09/04/2013 06:19 AM, Pavel Moravec wrote:
> > Hi all,
> > I identified a use case when moving (via QMF) more messages than the
> > destination queue can handle causes one message loss. See reproducer when
> > attempting to move 300 messages to a queue with max count 100:
> >
> >
> > $ qpid-receive -a "ringQueue; {create:always, node:{ x-declare:{
> > arguments:{'qpid.max_count':100}}}}"
> > $ qpid-send -a "fromQueue; {create:always}" -m 1000
> > $ qpid-tool
> > Management Tool for QPID
> > qpid: list broker
> > Object Summary:
> >      ID   Created   Destroyed  Index
> >      =======================================
> >      117  08:11:52  -          amqp-broker
> > qpid: call 117 queueMoveMessages fromQueue ringQueue 300 {}
> > qpid: resource-limit-exceeded: Policy exceeded on ringQueue, policy: size:
> > max=104857600, current=1000; count: max=100, current=100; type=reject
> > (qpid/broker/QueuePolicy.cpp:92) (7) - {}
> > qpid: quit
> > Exiting...
> > $ qpid-stat -q
> > Queues
> >    queue                                     dur  autoDel  excl  msg
> >    msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
> >    
> > =========================================================================================================================
> >    3d03d063-4f1e-4cc2-822f-00d95d7e42e9:0.0       Y        Y        0     0
> >    0       0      0        0         1     2
> >    fromQueue                                                      899
> >    1.00k   101    8.99k  10.0k    1.01k        0     1
> >    ringQueue                                                      100   100
> >    0    1.00k  1.00k       0         0     1
> > $
> >
> > My question is: is it a bug or intended behaviour?
> >
> > On one side, the broker should not lose any message. On the other side, it
> > is an operator mistake trying to route more messages than the destination
> > queue can handle.. (and moreover, knowing the method responsible for
> > moving the messages, it would not be trivial to fix this without
> > performance impact, I guess).
> >
> > Any comments?
> >
> 
> IMO this is a bug. It looks like MoveMessage is removing the message from the
> source queue before verifying that it can be successfully added to the
> destination queue rather than the other way around.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to