ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » MQ C++ API readItem is not incrementing the buffer pointer

Post new topic  Reply to topic
 MQ C++ API readItem is not incrementing the buffer pointer « View previous topic :: View next topic » 
Author Message
Kalyani Mallipeddi
PostPosted: Thu Jul 12, 2007 10:50 pm    Post subject: MQ C++ API readItem is not incrementing the buffer pointer Reply with quote

Newbie

Joined: 12 Jul 2007
Posts: 2

Hi All,
I am reading from a destructive queue using readItem method.
The buffer pointer is not incremented for the first time for each row.
The problem is coming only when multiple messages are written to a single row and reading from destructive queue.

For eg:, If I write 2 messages per roq into a QUEUE,
my messages in QUEUE will appear like this,
Line :1: Line :2:

While reading from that queue in destructive mode,
Line :1: is read twice.
so if a QUEUE has 2 messages in one row , while reading in destructive
read we are getting total 3 messages.

Can anybody help me in this?

I appreciate your help.

Thanks,
-Kalyani.M
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 12, 2007 11:07 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Doesn't readItem move the pointer for known formats (RFH2, dead letter header, etc)? If you've got user data in the buffer which you know to be 2 separate things, don't you need a separate pointer to obtain them?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Kalyani Mallipeddi
PostPosted: Thu Jul 12, 2007 11:33 pm    Post subject: Reply with quote

Newbie

Joined: 12 Jul 2007
Posts: 2

We will not be knowing before whether the row has single message or multiple messages. Also it is able to sense the delimiters after each message.
readItem reads the queue and gets the message into our local buffer.
So our buffer will contain whatever readItem has read but not the total message.

so in our case readItem is reading first message from the buffer multiple times. But it is reading second message onwards properly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQ C++ API readItem is not incrementing the buffer pointer
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.