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 » General IBM MQ Support » Queues not showing messages

Post new topic  Reply to topic
 Queues not showing messages « View previous topic :: View next topic » 
Author Message
kaitlyn
PostPosted: Wed Nov 09, 2005 7:54 am    Post subject: Queues not showing messages Reply with quote

Apprentice

Joined: 24 Nov 2004
Posts: 25

We have encountered a really strange thing happening. We have some queues set up that have a failure queue associated with them (no, this isn't the strange thing). As an example, we have a queue called A and then we have a queue called AFailure and this allows us to know which failure queues are associated with which queue, just by the name. What we do is to set the AFailure as the backout queue and only have the A queue try to process 1 time, then on a failure it will go to the AFailure queue (via MQ). This process seems to work quite nicely for us as this PREVENTS the listeners from EVER shutting down, yet still allows processing to continue for those that can. With that being said, we also have some failure queues that we actually PUT messages into WITHOUT letting MQ put them there (this is done via Java). The A queue gets and xml formatted message (called a batch) that has 1 to many records to process. As this example goes, I will tell you that the message in A queue has three records. The first one processes with and error, so the Java code creates a mini-batch and puts ONLY that 1 record into the AFailure queue, then processes record 2. Two passes. Then it processes record 3 and it fails. It will then create a mini-batch and put that into the AFailure queue. So, with the first message (batch), there were three records to process, one processed successfully, and the other two failed, so they got put into AFailure queue by Java, not by MQ. The exception for those two failures is caught and this allows that first message off the A queue to go away and allow it to move on to the next batch.

Now that all of that is out of the way, I noticed something strange this morning. There were three mini-batches created and put on the queue at 9:44 pm last night (as evidenced in our logs on the Java side). When I looked this morning, they were NOT on the AFailure queue. I was asked to re-process (move from the AFailure queue to the A queue) three messages. At that time, that dropped the count on the AFailure queue from 593 to 590. Everything good so far. Since it sat at 590, I thought that the three I ran back through had processed successfully (this was all done at 6:55 am this morning). I went and checked the logs and it indicated that the three messages I tried to process errored out and were (via Java) put onto the Failure queue. I found this strange as the count still said 590. I refreshed my list and it still said 590. I double checked the log and saw I wasn't still asleep and then went back and refreshed my mq monitor and noticed that it finally jumped up to 593. Everything good, right? NO! The 3 messages it put on there were from 9:44 LAST NIGHT!

What the heck is going on? I now can't see the 3 messages that happened at 6:55 am this morning! And why would the 3 that failed 6 hours beforehand just now show up in the queue? I did confirm the message limit was 5000, so that can't be it. Any ideas? Sorry this message is so long, but I figured you needed to understand what was happening in order to help me figure out what the problem is.
Back to top
View user's profile Send private message
fschofer
PostPosted: Wed Nov 09, 2005 9:05 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
when does your java program issue a commit to the messages in the Afailure queue.
If you put your messages under syncpoint you can see them only after a commit.

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
JT
PostPosted: Wed Nov 09, 2005 10:48 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

It's been some time since I've done any MQ programming, but here's my guess.

Since the PutTime parameter is considered origin context of the message, depending upon the CONTEXT option (PASS vs SET) you specified when writing the message to the queue, it's possible that even though the three messages were written back out to the queue at 6:55am, they maintained the original PutTime value of 9:44pm.

Quote:
Passing all context
If your application gets a message, and puts the message data (unchanged) into another message, the application should pass both the identity and the origin context information from the original message to the new message. An example of an application that might do this is a message mover, which moves messages from one queue to another.

It's something to look into...
Back to top
View user's profile Send private message
kaitlyn
PostPosted: Wed Nov 09, 2005 11:26 am    Post subject: Reply with quote

Apprentice

Joined: 24 Nov 2004
Posts: 25

No, the message that showed up in there (the latter 3) are NOT the same messages. I know this because in each message it has the name of the batch file it is processing. This is our link between messages and input files. As a result, we can track them via the logs.

Anyway, here's some sample code that does the put into the queue:

public void putOnQueue()
{
try
{
JMSService service = new JMSService();
System.out.println("\ninstantiating a CorticonBO object...");
CorticonBO foo = new CorticonBO();

String fileString = "C:\\temp\\inputDir\\inputFile.xml";

System.out.println("\nreading the input xml from " + fileString);

File inputFile = new File(fileString);
FileReader reader = new FileReader(inputFile);
StringBuffer sb = new StringBuffer();
int count = 0;
char c;

while(reader.ready())
{
c = (char)reader.read();
sb.append(c);
count++;
}

System.out.println("\nprinting the first 100 characters out of " + count + ":\n" +sb.toString().substring(0, 100));

service.put("jms.q.txcomp.edi", null, sb.toString());

reader.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Nov 09, 2005 12:19 pm    Post subject: Reply with quote

Jedi Knight

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

It shouldn't make a difference, but are these messages being put with the base WMQ api or JMS?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kaitlyn
PostPosted: Wed Nov 09, 2005 12:28 pm    Post subject: Reply with quote

Apprentice

Joined: 24 Nov 2004
Posts: 25

They are being put into a standalone version of MQ (530.11 CSD11). It's not the one embedded in WebSphere.
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Nov 09, 2005 12:31 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Is that code snippet the program that puts the messages to queue A or queue AFailure?

What does this mean:
Quote:
With that being said, we also have some failure queues that we actually PUT messages into WITHOUT letting MQ put them there (this is done via Java).
What do you mean "done via Java"? Do you mean JMS?

Also, what tool are you using to monitor the qdepth on the AFailure queue?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
bower5932
PostPosted: Wed Nov 09, 2005 12:31 pm    Post subject: Reply with quote

Jedi Knight

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

But are they being put with JMS or the native API? I can't tell from your code, and I see a 'jms' in it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kaitlyn
PostPosted: Wed Nov 09, 2005 12:40 pm    Post subject: Reply with quote

Apprentice

Joined: 24 Nov 2004
Posts: 25

Sorry, they're using the javax QueueSender to do that (JMS).
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Nov 10, 2005 10:20 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Are you still around? Can you answer my questions in my previous post?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Queues not showing messages
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.