Author |
Message
|
Steve Martin |
Posted: Thu Sep 11, 2008 6:45 am Post subject: Segmented messages - First segment being dropped |
|
|
Novice
Joined: 01 Aug 2003 Posts: 13
|
We have been running on 5.3 for a long time and have recently upgraded to 6.0.2.3. We have a .Net program so we are using the .Net library.
Some of our multi-segment messages are being received without the first part. We get no failures during the puts of the segments. As an example, we have a 5 segment message. 1..112..223..334..445..55. When we do a get on the receiving end the first message we receive is 2..22 and it continues on to 5..55.
If we disable the receiver and look at the messages in the queue, we see the following:
- Current depth = 4
- Max depth = 5
- We cannot look at the content of any of the segments.
The code we are using looks something like this:
Code: |
qm = New MQQueueManager(replyToQueueManagerName)
queueOpenOptions = MQC.MQOO_OUTPUT _
Or MQC.MQOO_FAIL_IF_QUIESCING
queue = qum.AccessQueue(replyToQueueName, queueOpenOptions)
If vIsLast Then
msgFlag = MQC.MQMF_LAST_SEGMENT
Else
msgFlag = MQC.MQMF_SEGMENT
End If
Dim pm As MQMessage = New MQMessage
pm.MessageType = MQC.MQMT_REPLY
pm.MessageFlags = msgFlag
pm.Persistence = MQC.MQPER_NOT_PERSISTENT
pm.Version = MQC.MQMD_VERSION_2
pm.CorrelationId = Me.MsgRequest.MessageId
pm.Format = MQC.MQFMT_NONE
pm.Expiry = CInt(Me.MsgRequest.Expiry)
Dim testtxt As String = segment.getMsgText()
pm.WriteUTF(testtxt)
queue.Put(pm, pmo)
|
This is extracted from a few different classes/methods, but I believe it is accurate.
Any ideas would be greatly appreciated. |
|
Back to top |
|
 |
Steve Martin |
Posted: Thu Sep 11, 2008 6:51 am Post subject: Forgot to list commit that is also in the code. |
|
|
Novice
Joined: 01 Aug 2003 Posts: 13
|
Code: |
End While
queueManager.Commit()
Catch ex As Exception
If TypeOf ex Is MQException Then
Logger.Info("doWork > Message = " & ex.Message)
Else
Logger.Info("doWork(): " & ex.Message)
End If
If Not queueManager Is Nothing Then
queueManager.Backout()
End If
Logger.Alert("Failure to send reply message", "Unable to send reply message because: ", ex, Logger.AlertMode.Always, New LogContext())
|
We are not getting any error messages and so a backout should not be occurring. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Sep 11, 2008 8:29 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
We cannot look at the content of any of the segments |
Why not? Being able to look at the MD will confirm whether or not the first segment is missing from the queue or being ignored by your application. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Steve Martin |
Posted: Thu Sep 11, 2008 8:33 am Post subject: |
|
|
Novice
Joined: 01 Aug 2003 Posts: 13
|
When issuing a get, it says that no messages are in the queue, even though the current depth is 4. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Sep 11, 2008 8:44 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Can you browse the queue using a browse utilitiy, like amqsbcg? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Sep 11, 2008 8:46 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Steve Martin wrote: |
When issuing a get, it says that no messages are in the queue, even though the current depth is 4. |
This sounds like you haven't committed your messages. |
|
Back to top |
|
 |
SAFraser |
Posted: Thu Sep 11, 2008 9:32 am Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
Umm.. really stepping into an area where I have no experience, but.... if he's segmenting his messages, isn't it proper not to commit till all segments have been received? |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Sep 11, 2008 9:52 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Yep, to assure that the order the messages are received are in the exact same order that they were put to the queue, they should be put in syncpoint and comitted at the LAST_SEGMENT put. Or backed out.
Quote: |
We have a .Net program |
Are you saying that this program worked correctly at v5.3 and now fails? Or is this a new application that hasn't run successfully yet?
I'm guessing that the reply message you are creating traverse a network to get back to the requestor. True?
You are creating non-persistent reply messages. It is possible that with maxdepth at 5, and no dead-letter queue, some of the replies are discarded by mq. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Last edited by bruce2359 on Thu Sep 11, 2008 10:05 am; edited 1 time in total |
|
Back to top |
|
 |
SAFraser |
Posted: Thu Sep 11, 2008 10:03 am Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
So if this poor fellow is missing one of the segments, he can't browse the remaining four.
I have no useful ideas, except for troubleshooting. Do these come across a channel? Can you stop the channel and see if all five segments are present at that point (in the transmit queue)? |
|
Back to top |
|
 |
Steve Martin |
Posted: Thu Sep 11, 2008 10:08 am Post subject: |
|
|
Novice
Joined: 01 Aug 2003 Posts: 13
|
I am doing the commit at the end. Am I missing something to start the syncpoint at the beginning? Or is the following code sufficient when putting the messages?
I apparently missed the following code where I define the put options.
Code: |
Public Function GetOptions() As Integer
Dim result As Integer
If vMustSegment Then
result = MQC.MQPMO_LOGICAL_ORDER _
Or MQC.MQPMO_SYNCPOINT
Else
result = 0 'no additional options
End If
Return result
End Function
|
|
|
Back to top |
|
 |
Steve Martin |
Posted: Thu Sep 11, 2008 10:13 am Post subject: |
|
|
Novice
Joined: 01 Aug 2003 Posts: 13
|
This program has been running successfully in 5.3 for 3+ years now. With the switch to 6, it is now breaking. |
|
Back to top |
|
 |
Steve Martin |
Posted: Thu Sep 11, 2008 10:17 am Post subject: |
|
|
Novice
Joined: 01 Aug 2003 Posts: 13
|
We are using client channels for both sending and receiving the messages.
We have tried with many different message sizes and number of segments. 2, 5, 70, 700 segments. On some messages the first segment goes through. But in most cases the first one does not go through but the rest do. I suppose that we could send dummy text in the first segment  |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Sep 11, 2008 10:19 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
This program has been running successfully... |
Bummer. Moving on...
[EDIT] Our posts crossed in the net.
Hmmm. First segment...
Given that there are messages remaining in the queue AND they don't appear to be comitted...
I'd look more closely at the code in the app that creates the messages to ensure that the MD is appropriately seeded (initialized) before the first segment is put, AND that is it, in fact, a SEGMENT. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Steve Martin |
Posted: Thu Sep 11, 2008 10:29 am Post subject: |
|
|
Novice
Joined: 01 Aug 2003 Posts: 13
|
Quote: |
Why do you have the (reply-to-) queue maxdepth set to 5? |
We don't have it set. That is the max that has gone into it when reported. So at one point it got as high as 5, but currently there are four messages.
Quote: |
Why are you creating non-persistent messages? |
Some of our messages are large in total (20MB) but there is no need to keep them around if there is a queue failure, the user will retry if necessary.
Quote: |
Do the messages traverse a channel? |
Yes. Both puts and gets go over channels.
Quote: |
Is the channel attribute set to NPMSPEED(FAST)? |
Checking with our MQ Administrator. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Sep 11, 2008 10:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Do you have expiry set on the messages?
Could it be that your first segment has expired?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|