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 » Message Exit - Put Date/Time issue

Post new topic  Reply to topic
 Message Exit - Put Date/Time issue « View previous topic :: View next topic » 
Author Message
Maddy73
PostPosted: Sun May 21, 2006 6:47 pm    Post subject: Message Exit - Put Date/Time issue Reply with quote

Newbie

Joined: 21 May 2006
Posts: 8

Hi All,
I have written a Message Exit which copies messages passing through a channel and put it into a log queue. New MQMD is generated for the copied msg. The original msg header is stored as a RFH2 header in the copied msg. The original msg body is copied to the new msg body.

I let MQ handle the put date & time for the copied msg. The problem is sometimes the put time updated by MQ is not correct.

The scenario is:
We have installed the message exit on both receiver and sender exits on our end. We receive message from front-end and do some transformation and send the transformed msg to the host (we're in the middle).

Sometimes the put date time on the copied msg from the receiver is later than the put date time on the copied msg from the sender. This indicates the message has been send to the host before it even arrive at our end. Which is incorrect.

The purpose of the exit is to track the message and also report the time taken to process the message.

From my understanding about MQ Message Exit:
1. The original msg will only be put to the target queue once the Message Exit completes it's processing.
2. Since the copying of the original message is done within the Message Exit, and the put date time of the copied msg is handled by MQ during the MQPUT call, the time should be always updated at that point and not later.

Please correct me if I got it wrong.
Does anyone out there encountered this scenario before ? If yes, what is the solution ?

Any help would appreciated. Thanks.
------------------------------------------------------------------------
Some details:

MQOPEN Options for the log queue:
MQOO_OUTPUT | MQOO_FAIL_IF_QUIESCING | MQOO_SET_IDENTITY_CONTEXT | MQOO_ALTERNATE_USER_AUTHORITY;

MQPMO For the MQPUT call from the exit:
MQPMO_FAIL_IF_QUIESCING | MQPMO_NEW_MSG_ID | MQPMO_SYNCPOINT | MQPMO_SET_IDENTITY_CONTEXT

Note: MQPMO_SYNCPOINT is only used when the original msg is under syncpoint. Otherwise I use MQPMO_NO_SYNCPOINT.
------------------------------------------------------------------------
_________________
Regards,
Maddy
Scope International (M)
Back to top
View user's profile Send private message Yahoo Messenger
Nigelg
PostPosted: Mon May 22, 2006 3:04 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

You may be reading the put date and time from the wrong place. The right place is from the embedded MD in the XQH header of the msg; this is the actual put time as recorded when the msg was first put.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
Maddy73
PostPosted: Mon May 22, 2006 3:16 am    Post subject: Reply with quote

Newbie

Joined: 21 May 2006
Posts: 8

I'm not interested at the put date time of the original message which is passing through the channel. I'm talking about the put date time which is updated into the MQMD of the copied message. I let MQ updates the put date time for the copied message(newly created in the Message Exit for every message passing through it).
_________________
Regards,
Maddy
Scope International (M)
Back to top
View user's profile Send private message Yahoo Messenger
Maddy73
PostPosted: Mon May 22, 2006 3:25 am    Post subject: Reply with quote

Newbie

Joined: 21 May 2006
Posts: 8

One solution that I can think of is to set the Origin Context by myself in the Message Exit for the [b]Copied msg[\b] (new). But I thought it's best to let MQ handle it.

Any suggestion would be appreciated. Thanks.
_________________
Regards,
Maddy
Scope International (M)
Back to top
View user's profile Send private message Yahoo Messenger
wschutz
PostPosted: Mon May 22, 2006 6:18 am    Post subject: Reply with quote

Jedi Knight

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

Quote:
Sometimes the put date time on the copied msg from the receiver is later than the put date time on the copied msg from the sender
how much later? How do you keep the clocks on the machines in sync?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Maddy73
PostPosted: Mon May 22, 2006 5:28 pm    Post subject: Reply with quote

Newbie

Joined: 21 May 2006
Posts: 8

The max time different is 7 seconds. We use time server to synch our servers. But we're only talking about QMgr on a single box. On average, this only happens every 6k messages. Our volume is roughly 300k messages per day.
_________________
Regards,
Maddy
Scope International (M)
Back to top
View user's profile Send private message Yahoo Messenger
Mr Butcher
PostPosted: Mon May 22, 2006 9:15 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

maybe you just match two messages that are not related?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
Maddy73
PostPosted: Tue May 23, 2006 12:24 am    Post subject: Reply with quote

Newbie

Joined: 21 May 2006
Posts: 8

We use Correl ID to match the transactions. If wrong Correl ID is matched, it will result in duplicate messages / duplicate record for a tracking point. But this is not the case I guess.

We use a loader program which loads the log messages to DB for viewing. I notice that if we put invalid put date time for a message, the put date time value retrived from a MQMessage object contains current system time in GMT.

So, is there a possibility where put date time value updated by MQ becomes invalid/corrupted.
_________________
Regards,
Maddy
Scope International (M)
Back to top
View user's profile Send private message Yahoo Messenger
Maddy73
PostPosted: Tue May 23, 2006 12:26 am    Post subject: Reply with quote

Newbie

Joined: 21 May 2006
Posts: 8

The loader program is written in Java. Forgot to mention that !
_________________
Regards,
Maddy
Scope International (M)
Back to top
View user's profile Send private message Yahoo Messenger
tleichen
PostPosted: Tue May 23, 2006 6:35 am    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

I would double-check what is happening here. For that kind of volume, it seems rather mysterious to have this occur once in every 6,000 messages. Make sure your msgid/correlationId pairing is working right. Also, make sure there is nothing occurring on the originating system to delay commitment of the message, i.e., another task taking up resources for a short time.
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
Maddy73
PostPosted: Mon Jun 12, 2006 8:07 am    Post subject: Reply with quote

Newbie

Joined: 21 May 2006
Posts: 8

The root cause of the problem have been identified. The put date time actually have been accidentally modified by MQSI message flow. Now it has been rectified. Thanks to everyone who have responded.
_________________
Regards,
Maddy
Scope International (M)
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Message Exit - Put Date/Time issue
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.