qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nithesh Shetty <knitheshshe...@yahoo.com>
Subject localqueue get
Date Mon, 13 Jul 2009 11:19:23 GMT

Hi
I have created a producer=A0sample with the following option:
QueueOptions queueOptions;
queueOptions.setOrdering(FIFO);
session.exchangeDeclare(arg::exchange="QM", arg::exclusive = false, arg::autoDelete = false,
arg::type = "direct");
session.queueDeclare(arg::queue="RMS", arg::exclusive = false, arg::autoDelete = false, arg::arguments
= queueoptions);
session.exchangeBind(arg:: exchange="QM", arg::queue="RMS", arg::binding=
gKey="QM_ROUTE_KEY");
Message message;
message.getDeliveryProperties().setRoutingKey(routeKey);
string buffer(256, 'A');

for (int i=3D0; i < 10; ++i)
{
message.setData(buffer);
async(session).messageTransfer(arg::content=message, arg::destination="QM"
t, arg::acceptMode = message::ACCEPT_MODE_NONE, arg::acquireMode=me
ssage::ACQUIRE_MODE_PRE_ACQUIRED, arg::sync = false;);
}

session.sync();
%%%%%%%%%%%%%%%%%%%%%%%
the listener sample has the following settings;
SubscriptionManager subscriptions(session);
SubscriptionSettings settings;
settings.acceptMode = ACCEPT_MODE_NONE;
settings.acquireMode = ACQUIRE_MODE_PRE_ACQUIRED;
LocalQueue local_queue;
subscriptions.subscribe(local_queue, "RMS", settings, "rmsset");
 
Message message = local_queue.get();
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
now the problem is if i put ten message in the queue and get one message and then close
the connection the rest of the nine message gets dequeued...
 
Is there any setting which is incorrect above or any other error. 
 
Awaiting your reply.
 
Nithesh
 
 
 
 
 
 
 

 


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message