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 » User Exits » TIP: COD generation and its authorization on the local QM

Post new topic  Reply to topic
 TIP: COD generation and its authorization on the local QM « View previous topic :: View next topic » 
Author Message
HenriqueS
PostPosted: Tue Jan 22, 2008 12:42 pm    Post subject: TIP: COD generation and its authorization on the local QM Reply with quote

Master

Joined: 22 Sep 2006
Posts: 235

Just to leave a finding here...for future searches.

We have been developing a message exit that 'stamps' every incoming message under a certain user id.

All the generated CODs are generated using this id, so such user id MUST have the proper permissions to flow back to the origin MQ server or it will end on the DLQ with a MQRC_NOT_AUTHORIZED. This is done including creating this user id on the local server and including it on the local mqm group.

Well, our exit did put the user id string in capital letters on every incoming message.

Our support team created a user using the Unix standard, in lowercase.

MQ refused to deliver back the generated COD message. Always being stuck in the DLQ.

After hours of trial and error we found the solution: keep both user ids in lowercase!

Regards,
_________________
HenriqueS
Certified Websphere MQ 6.0 System Administrator
Back to top
View user's profile Send private message
xzhou
PostPosted: Wed Dec 02, 2009 12:18 pm    Post subject: 'stamps' incoming messages Reply with quote

Apprentice

Joined: 11 Apr 2008
Posts: 32

Hi HenriqueS,

I am doing the same as you did. I used the following code in order to 'stamps' (or replace the timestamp of incoming message with current system time )every incoming message using message exit.

pMsgDesc = (PMQMD)&(pMQXQH->MsgDesc);
strncpy(pMsgDesc->PutDate ....);
strncpy(pMsgDesc->PutTime ...);

could you please advise if I did correctly.

Thanks in advance!

xzhou
Back to top
View user's profile Send private message
HenriqueS
PostPosted: Mon Dec 07, 2009 8:08 am    Post subject: Re: 'stamps' incoming messages Reply with quote

Master

Joined: 22 Sep 2006
Posts: 235

I guess that´s pretty much it...here it is a sample from what I did, there is some redundant stuff, like some memset´s.

Code:

PMQXQH pMQXQH;
pMQXQH  = (PMQXQH) pAgentBuffer;
...
char useridentifier[12] = "myuser"; /* MQCHAR12 */
strcpy(pMQXQH->MsgDesc.UserIdentifier, useridentifier);
...
memset(pMQXQH->MsgDesc.PutApplName, '\0', MQ_APPL_NAME_LENGTH);
   pMQXQH->MsgDesc.PutApplType = MQAT_UNKNOWN;
...



xzhou wrote:
Hi HenriqueS,

I am doing the same as you did. I used the following code in order to 'stamps' (or replace the timestamp of incoming message with current system time )every incoming message using message exit.

pMsgDesc = (PMQMD)&(pMQXQH->MsgDesc);
strncpy(pMsgDesc->PutDate ....);
strncpy(pMsgDesc->PutTime ...);

could you please advise if I did correctly.

Thanks in advance!

xzhou
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Mon Dec 07, 2009 2:42 pm    Post subject: Re: 'stamps' incoming messages Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2495
Location: Melbourne, Australia

xzhou wrote:
Hi HenriqueS,

I am doing the same as you did. I used the following code in order to 'stamps' (or replace the timestamp of incoming message with current system time )every incoming message using message exit.

pMsgDesc = (PMQMD)&(pMQXQH->MsgDesc);
strncpy(pMsgDesc->PutDate ....);
strncpy(pMsgDesc->PutTime ...);

could you please advise if I did correctly.
Thanks in advance!
xzhou


What is the requirement for changing the MQMD PutDate & PutTime? This creates a local system time dependency in MQ. If the system changes to or from daylight savings time it could create holes or duplicate times in MQ messages. MQ works purely with GMT, and its best to leave it that way.
_________________
Glenn
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 » User Exits » TIP: COD generation and its authorization on the local QM
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.