|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TIP: COD generation and its authorization on the local QM |
« View previous topic :: View next topic » |
Author |
Message
|
HenriqueS |
Posted: Tue Jan 22, 2008 12:42 pm Post subject: TIP: COD generation and its authorization on the local QM |
|
|
 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 |
|
 |
xzhou |
Posted: Wed Dec 02, 2009 12:18 pm Post subject: 'stamps' incoming messages |
|
|
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 |
|
 |
HenriqueS |
Posted: Mon Dec 07, 2009 8:08 am Post subject: Re: 'stamps' incoming messages |
|
|
 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 |
|
 |
gbaddeley |
Posted: Mon Dec 07, 2009 2:42 pm Post subject: Re: 'stamps' incoming messages |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|