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 » MQ gurantee first send first receive??

Post new topic  Reply to topic Goto page Previous  1, 2
 MQ gurantee first send first receive?? « View previous topic :: View next topic » 
Author Message
Vitor
PostPosted: Fri Dec 29, 2006 1:28 am    Post subject: Reply with quote

Grand High Poobah

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

angka wrote:
Hi,

Thanks for the reply.. Think i will let the application do it.. Happy New Year..

Cheers


Good Call!

Happy New Year to you as well...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Dec 29, 2006 2:31 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Vitor wrote:
pathipati wrote:
Probably MQ will guarantee FIFO.


"Probably" is not a really good guarantee!

And no, MQ does not guarantee FIFO delivery. In the scenario you're describing where sender & receiver are one-to-one then "very probably" is as good as you're likely to get. If that's good enough for your process is a decision only you can make.

also if you want to increase the "probability" remove all dead letter queues from the queuemanagers in the "FIFO" messages "path",
still it's better not to have message affinity as explained above...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Vitor
PostPosted: Fri Dec 29, 2006 2:50 am    Post subject: Reply with quote

Grand High Poobah

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

Michael Dag wrote:
also if you want to increase the "probability" remove all dead letter queues from the queuemanagers in the "FIFO" messages "path"


There are a number of tricks you can pull (like this one) to increase likelyhood. Like this one, it's much like getting more speed by putting a rocket engine in a Model T Ford. It can be done and it will make the car go much faster in a straight line. If later on you have a requirement to go round corners, you may encounter difficulties.

And woe betide you if you hit a bump in the road!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Dec 29, 2006 4:06 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Vitor wrote:
Michael Dag wrote:
also if you want to increase the "probability" remove all dead letter queues from the queuemanagers in the "FIFO" messages "path"


There are a number of tricks you can pull (like this one) to increase likelyhood. Like this one, it's much like getting more speed by putting a rocket engine in a Model T Ford. It can be done and it will make the car go much faster in a straight line. If later on you have a requirement to go round corners, you may encounter difficulties.

And woe betide you if you hit a bump in the road!


you clearly missed my last line:
Michael Dag wrote:

still it's better not to have message affinity as explained above...

_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Vitor
PostPosted: Fri Dec 29, 2006 4:11 am    Post subject: Reply with quote

Grand High Poobah

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

Michael Dag wrote:

you clearly missed my last line:
Michael Dag wrote:

still it's better not to have message affinity as explained above...


Didn't miss it, just thought I'd made my position on the evils of message affinity clear on early posts & thought I'd rant about the evils of not having DLQs for a change....

....I try and vary my rants to stay in practice.

For the record, I think you're quite right, it's better not to have message affiinity and I'm glad the final decision was to let the application sort it all out!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Dec 29, 2006 8:15 am    Post subject: Reply with quote

Guest




Read "getting messages..." section of the Application Programmers Guide. It discusses physical vs. logical. There are many and varied reasons why a message might not arrive at a queue.

MQ offers Message Groups, a programming construct, to ensure that messages will be gotten from the queue in the same sequence as they were put to the queue - regardless of tcpip, other applications putting to the queue and/or getting from the queue.
Back to top
pathipati
PostPosted: Fri Dec 29, 2006 9:01 am    Post subject: Reply with quote

Master

Joined: 03 Mar 2006
Posts: 296

I guess angka got One-to-One setup..
Back to top
View user's profile Send private message Yahoo Messenger
jsware
PostPosted: Tue Jan 02, 2007 6:11 am    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

Vitor wrote:
scottj2512 wrote:

2. You might be able to use the msg seq number and match on sequence number. I have not tried this.


I would be surprised to discover this works.
I see nothing in the text describing MQMO_MATCH_MSG_SEQ_NUMBER in the programmer's reference saying that it must be used with another option. All it says is:
Quote:
Retrieve message with specified message sequence number.
This option specifies that the message to be retrieved must have a message sequence number that matches the value of the MsgSeqNumber field in the MsgDesc parameter of the MQGET call. This match is in addition to any other matches that may apply (for example, the group identifier).

If this option is not specified, the MsgSeqNumber field in the MsgDesc parameter is ignored, and any message sequence number will match.

_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jan 02, 2007 1:54 pm    Post subject: Reply with quote

Guest




MQMO_MATCH_MSG_SEQ_NUMBER

sc34-6595-00 Application Programming Guide, section entitled "Getting a specific message," page 127-128:

If you set the Version field of the MQMD structure to 2 or 3, you can use the GroupId, MsgSeqNumber, and Offset fields. Table 5 shows which message is retrieved for the possible settings of these fields.

From the table:
MQMO_MATCH_MSG_SEQ_NUMBER First message that matches MsgToken
Back to top
angka
PostPosted: Thu Sep 20, 2007 1:24 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

I checked the MQ intercommunication redbook and found this
"The channel uses sequence numbers to assure that messages are delivered, delivered without duplication, and stored in the same order as they were taken from the transmission queue"

so this mean physically the messages will arrive at the local queue in the order it leaves the transmission queue... am i right? this is wat I want to know in the beginning. think the question i ask too vague.

Thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 20, 2007 1:40 am    Post subject: Reply with quote

Grand High Poobah

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

angka wrote:
so this mean physically the messages will arrive at the local queue in the order it leaves the transmission queue... am i right? this is wat I want to know in the beginning. think the question i ask too vague.


What it doesn't mean is that the messages will be presented to the getting application in this order. They probably will be, but consider the case where a block of 10 messages turn up, with the 4th message having a higher priority than the others. This message must be presented first in a priority queue, but what does the next get obtain? The 1st message or the 5th because that's where the queue cursor is? Likewise if there are 2 blocks of messages arriving chronologically close on a pure FIFO, which block becomes available first? And which will the queue manager present in response to a get?

The answer to your original question remains the same IMHO. WMQ does not guarantee to deliver messages in sequence, it will probably deliver them in sequence and that probably is a bad thing to base a design on.

Also see my rant earlier in this post about message affinity and how it makes you go blind, causes global warming, reduces cities to blighted wastelands, etc, etc, etc
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Sep 20, 2007 5:34 am    Post subject: Reply with quote

Guest




When the order of messages is required (and not otherwise ensured according to rules specified in the APG, APR and Intercomm manuals), programmers can create MQ Message Groups. Message Groups consist of one or more physical message comprising a logical message.

The MQPUTting application will need to code the appropriate put options to put messages as part of the Message Group with a GroupId (like MsgId and CorrelId) and Message sequence number. As stated in other posts here, the MQGETting application will need to specify the appropriate get options (message in group) to ensure that messages are received in same order as they were MQPUT.

Yes, message affinity will cause heartburn; but some applications are architected that way.
Back to top
mvic
PostPosted: Fri Sep 21, 2007 1:24 pm    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

I thought I would post a link that covers this subject in some detail. Particularly the paragraph with the bullet points is worth reviewing.

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzal.doc/fg12610_.htm
Back to top
View user's profile Send private message
jsware
PostPosted: Thu Sep 27, 2007 1:40 pm    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

bruce2359 wrote:
MQMO_MATCH_MSG_SEQ_NUMBER

sc34-6595-00 Application Programming Guide, section entitled "Getting a specific message," page 127-128:

If you set the Version field of the MQMD structure to 2 or 3, you can use the GroupId, MsgSeqNumber, and Offset fields. Table 5 shows which message is retrieved for the possible settings of these fields.

From the table:
MQMO_MATCH_MSG_SEQ_NUMBER First message that matches MsgToken
When I read this section of the APG, it still reads like you can specify just the MQMO_MATCH_MSG_SEQ_NUMBER option to match on individual MQMD fields. Table 5 footnote 2 states that the MQMO flags can be used in combination. It does not state that they must be used in combination, nor does it say they cannot be used individually.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 27, 2007 1:49 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

scottj2512 wrote:
When I read this section of the APG, it still reads like you can specify just the MQMO_MATCH_MSG_SEQ_NUMBER option to match on individual MQMD fields. Table 5 footnote 2 states that the MQMO flags can be used in combination. It does not state that they must be used in combination, nor does it say they cannot be used individually.


The Options flags affect which MatchOptions are in use.
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzak.doc/js00862.htm

If you want to match on a specific MsgSeqNum, you have to NOT specify MQGMO_LOGICAL_ORDER.

There's more information on how matching is done in a table at that link.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » General IBM MQ Support » MQ gurantee first send first receive??
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.