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 » How is FIFO decided when all messages have same Priority?

Post new topic  Reply to topic
 How is FIFO decided when all messages have same Priority? « View previous topic :: View next topic » 
Author Message
J C Hill
PostPosted: Thu Jan 26, 2006 4:15 am    Post subject: How is FIFO decided when all messages have same Priority? Reply with quote

Newbie

Joined: 26 Jan 2006
Posts: 5

Could someone please explain how: -

When a queue is configured with a 'Message Delivery Sequence' of 'Priority' and messages have same 'Priority' how is FIFO established/calculated?

The reason I ask is that I've recently had a problem, similar to 'Messages delivered out of sync' problem from member 'thindk00' where messages are delivered in sequence, but are read out of sequence.

The scenario I have is WebSphere Broker v5 extracting tens of thousands of messages (from DB2) using an ORDER BY clause to establish sequence.

The messages are instantly dropped onto a Remote Queue, which is read by IBM's JText adaptor, and creates a flat file of the DB2 data.

99.99% of the time this works perfectly and the sequence is correct.

However, in rare situations, the sequence gets muddled for 1-2 records.

Because the 'Priority' value is actually the same for all messages, I've fixed the problem by changing 'Message Delivery Sequence' to FIFO.

But, in theory, I shouldn't need to do this.

Is 'FIFO' and 'Priority -> FIFO' different?

Cheers

J.

p.s. This is not a clustered/load balanced environment.

p.p.s The 'NumConcurrentRequests' on the adapter is set to '1'.
Back to top
View user's profile Send private message
csmith28
PostPosted: Thu Jan 26, 2006 7:41 am    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

You mena FIFO as in first in first out right?
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
J C Hill
PostPosted: Thu Jan 26, 2006 7:47 am    Post subject: Reply with quote

Newbie

Joined: 26 Jan 2006
Posts: 5

Exactly.
Back to top
View user's profile Send private message
JT
PostPosted: Thu Jan 26, 2006 8:01 pm    Post subject: Reply with quote

Padawan

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

How do you know the messages were delivered in sequence ?

Can you confirm that they arrived on the queue in sequence ?
Back to top
View user's profile Send private message
J C Hill
PostPosted: Fri Jan 27, 2006 2:11 am    Post subject: Reply with quote

Newbie

Joined: 26 Jan 2006
Posts: 5

Within each message on the queue, which is exported to the flat file via JText, there's a sequence number field (which is 'ordered by' when I extract the data from DB2).

I'm as sure as I can be that this is sound (unless there's some unknown problem with the ORDER BY clause in DB2....which I doubt) and each record is delivered to the remote queue in this order.

As for arriving on the JText queue in sequence, I believe this is the problem and that it doesn't...but the only evidence I really have is the file that JText builds (due to the large volumes of data involved and the rarity of the problem) which can be out of sequence on rare occasions.

What appears to be happening is that, when 'Message Delivery Sequence' is FIFO, the message order is maintained by a method such as an MQ sequence counter (that's a guess).

However, if FIFO is used because 'Message Delivery Sequence' is Priority, but all messages have same priority, then a different method of maintaining message order is used such as Date/Time stamp (again a guess).

The only evidence I have of the problem is that 'Message Delivery Sequence' FIFO works fine...but FIFO when Priority is the same doesn't appear to be 100% reliable.
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Jan 27, 2006 6:53 am    Post subject: Reply with quote

Jedi Knight

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

MQ has twenty "sub-queues", one for each priority (0-9) and one set for persistent and one set for non-persistent messages.

When you specify MSGDLVSQ(FIFO), the "default priority" of the queue is used to determine which sub-queue the message will go into. The message goes to the end of the sub-queue.

When you specify MSGDLVSQ(PRIORITY), the priority on the MQMD is used to determine which sub-queue the message will go into. The message goes to the end of the sub-queue.

Of course, MQPUT syncpoint considerations and uncommitted MQGETs by other applications could make the messages appear out of order ....

So, in theory, it shouldn't make a difference.

What is the platform and the MQ levels / CSDs?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
J C Hill
PostPosted: Mon Jan 30, 2006 2:20 am    Post subject: Reply with quote

Newbie

Joined: 26 Jan 2006
Posts: 5

Cheers Wayne.

Can we pick this up again w/c 6th February?

I'm not on site at the moment so can't provide accurate version details.

Cheers

J.
Back to top
View user's profile Send private message
Cliff
PostPosted: Mon Jan 30, 2006 9:17 am    Post subject: Reply with quote

Centurion

Joined: 27 Jun 2001
Posts: 145
Location: Wiltshire

The answer to your question is in your post - "The messages are instantly dropped onto a Remote Queue".

MQ is an asynchronous protocol - for message sequence to be guaranteed there are very specific criteria to be met. From memory these include: all messages put in a single unit of work, target queue to be local, only one instance of the putting program. As soon as you deliver messages remotely, there is scope for MQ (quite legitimately) to get things out of sequence. There might be a temporary network glitch, for example, resulting in messages being rolled back onto the xmitq and then sent again.

If sequence must be maintained for your application to work, you will have to design a programmatic mechanism to handle this.

HTH -
Cliff
Back to top
View user's profile Send private message Send e-mail
J C Hill
PostPosted: Wed Feb 08, 2006 1:53 am    Post subject: Reply with quote

Newbie

Joined: 26 Jan 2006
Posts: 5

Hi Cliff

I completely agree that the transmission of messages to remote queues has the potential for the problems you've described, as does multiple instances of a 'put' or 'get' program. However, all things being equal, the problem has cured itself by changing the order from 'Priority' to 'FIFO'...which is the reason for my original question regarding if there's a difference.

Cheers

J.
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 » General IBM MQ Support » How is FIFO decided when all messages have same Priority?
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.