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 » Application issue using syncpoint.

Post new topic  Reply to topic
 Application issue using syncpoint. « View previous topic :: View next topic » 
Author Message
JAdams
PostPosted: Tue Feb 25, 2003 11:02 am    Post subject: Application issue using syncpoint. Reply with quote

Apprentice

Joined: 11 Jul 2002
Posts: 47
Location: Lakeland, FL

We have a strange situation with an application that I have never seen before. I am hoping someone else has.

The situation is this....

I am running into a MQ issue with reading in messages from MQ queue. I have developed a MQ client application (MQReceive) that reads in messages using SYNC_POINT and commits to the queue manager when the batch is read. If messages were put in the queue in a batch, MQReceive can only read up to the end of the last batch.

E.g.
1. Write 9 messages into a queue (a commit is issued after all 9 messages are written)
2. Write 20 messages into a queue (a commit is issued after all 20 messages are written)
3. When MQReceive tries to read in 29 messages, it retrieves only 9 messages and receives a 2033 (NO_MSG_AVAILABLE) error.
4. Running MQReceive again to read in more messages, it can retrieve the remaining 20.

It seems that MQ Receive cannot read more messages than put batch size. This only happens with MQReceive. I even used amqsput to put different batches of messages and the application can only get the number of messages that were put in each batch....weird. Amqsget can get all the messages at once.

If anyone has a clue...please let me know asap.

Jason
_________________
Jason Adams
IBM Certified Specialist MQSeries
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 25, 2003 11:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What does your code look like? This may be perfectly normal behavior for the way you have coded your gets.
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Feb 25, 2003 11:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

My guess would be that you are getting your message by either correlation id or message id. You probably put each batch with its own unique id. You then issue the first mqget which fills in the message id and correlation id for the rest of the gets. You never get the second batch, shutdown, and it starts to work again. Check out the lines in amqsget0.c:
Code:

/****************************************************************/
/*                                                              */
/*   In order to read the messages in sequence, MsgId and       */
/*   CorrelID must have the default value.  MQGET sets them     */
/*   to the values in for message it returns, so re-initialise  */
/*   them before every call                                     */
/*                                                              */
/****************************************************************/
memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId));
memcpy(md.CorrelId, MQCI_NONE, sizeof(md.CorrelId));
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
JAdams
PostPosted: Tue Feb 25, 2003 12:16 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Jul 2002
Posts: 47
Location: Lakeland, FL

That makes sense...Where would I find the source code for amqsget?
_________________
Jason Adams
IBM Certified Specialist MQSeries
Back to top
View user's profile Send private message
clindsey
PostPosted: Tue Feb 25, 2003 12:48 pm    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

It is amqsget0.c.
On NT/2000 look in <mqtop>/tools/c/samples
Solaris - look in /opt/mqm/samp
AIX - look in /usr/lpp/mqm/samp
For others, try "find"

Charlie
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 » Application issue using syncpoint.
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.