Re: Subscribe cancel release question cpp broker

2009-02-12 Thread Gordon Sim
Canceling a subscription does not release any unaccepted messages. I think therefore that what is happening is that your local queue is receiving all the messages from the brokers queue and they are not released, preventing the second subscription from seeing them. You also need to set auto st

Re: Subscribe cancel release question cpp broker

2009-01-28 Thread Jonathan Robie
I commented out a bunch of stuff, and the second part works now: SubscriptionManager subscriptions(session); // Create a listener and subscribe it to the queue named "message_queue" Listener listener(subscriptions); // Receive messages until the subscription is cancelled //

Re: Subscribe cancel release question cpp broker

2009-01-28 Thread Carl Trieloff
yes, there are no dequeues, so the broker has all the messages which is correct. So it looks like the second subscriptions is not running - will look into that Carl. Adam Chase wrote: I used the qpid-tool and see this for my queue ( I guess I was only writing 10 messages in my producer):

Re: Subscribe cancel release question cpp broker

2009-01-28 Thread Adam Chase
I used the qpid-tool and see this for my queue ( I guess I was only writing 10 messages in my producer): Type Element110 = property vhostRef 103 property name message_queue prop

Re: Subscribe cancel release question cpp broker

2009-01-28 Thread Carl Trieloff
Adam, To determine where the issue is, you could also use qpid-tool then do a list show queue look for the queue ID show 'queue ID' and see what is on the queue after the cancel to the local queue. That will tell us if the client lib is holding onto them, or the new subscription is not ge

Re: Subscribe cancel release question cpp broker

2009-01-28 Thread Jonathan Robie
I find this surprising. When Adam does the cancel, I would expect all messages that haven't been acknowledged to be available on the server-side queue. When he subscribes the listener, I would expect him to receive the rest. In my programs I always set up the subscriptions first, then call st

Re: Subscribe cancel release question cpp broker

2009-01-28 Thread Carl Trieloff
Sorry, one more question, are you M4 or trunk, as Gordon had corrected something in this area a little while after M4. Still thinking but the cancel after the start. might need another start(?). I work more on the broker so will need to go look at that code. Carl. Adam Chase wrote: That

Re: Subscribe cancel release question cpp broker

2009-01-28 Thread Adam Chase
That is correct. I published 100 messages to the queue, got one off the localQueue and then cancelled. Since I didn't accept the one I would expect to get 100 from the listener. But I'm getting none. I think the LocalQueue must have prefetched them and be holding on to them. I thought maybe th

Re: Subscribe cancel release question cpp broker

2009-01-28 Thread Carl Trieloff
Adam Chase wrote: SubscriptionManager subscriptions(session); // Create a listener and subscribe it to the queue named "message_queue" Listener listener(subscriptions); // Receive messages until the subscription is cancelled // by Listener::received() LocalQueu

Subscribe cancel release question cpp broker

2009-01-27 Thread Adam Chase
SubscriptionManager subscriptions(session); // Create a listener and subscribe it to the queue named "message_queue" Listener listener(subscriptions); // Receive messages until the subscription is cancelled // by Listener::received() LocalQueue lq; subscrip