|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ C++ API readItem is not incrementing the buffer pointer |
« View previous topic :: View next topic » |
Author |
Message
|
Kalyani Mallipeddi |
Posted: Thu Jul 12, 2007 10:50 pm Post subject: MQ C++ API readItem is not incrementing the buffer pointer |
|
|
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 |
|
 |
Vitor |
Posted: Thu Jul 12, 2007 11:07 pm Post subject: |
|
|
 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 |
|
 |
Kalyani Mallipeddi |
Posted: Thu Jul 12, 2007 11:33 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|