Author |
Message
|
vibhu007 |
Posted: Mon Aug 29, 2005 9:14 pm Post subject: modifying message header using channel exit |
|
|
Newbie
Joined: 29 Aug 2005 Posts: 6
|
Is it possible to modify the message headers such as replytoqueue, putapplication name and other MQ headers using channel exits before sending it over to another queue manager?
If yes, pl. post the sample code. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon Aug 29, 2005 10:16 pm Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
1. yes
2. unfortunately, you decided not to tell us about your technical environment, and I do not want to post a zOS assembler sample for a unix guy. there are some exit samples delivered with mq, so take the intercommunication guide and a sample and modify it to fit your need.
you should also consider using other techniques to archive what you want. in most cases, there is a better solution. a channel exit should not correct "bad" work that comes from the application, change the application instead. some things can also be achieved by mq administration, e.g. qmgr alias and replytoq alias...... _________________ Regards, Butcher |
|
Back to top |
|
 |
vibhu007 |
Posted: Tue Aug 30, 2005 8:00 am Post subject: |
|
|
Newbie
Joined: 29 Aug 2005 Posts: 6
|
Thanks Butcher.
The environment is unix. The issue is with the appliIdentitydata property that needs to go on the message. As the message producer is JMS and consumer is MQ, the id that is set through JMS (using setstringproperty) gets lost/ignored as soon as we say the destination is MQ.
To achieve the same, I guess channel exit can be used. Pl. advise which channel exit to use and can you pl. post the sample code. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Aug 30, 2005 10:15 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
I came across the exact same problem recently at a client site. Hummmm.
I agree with Mr Butcher comments but in this case the 'server app' was at an external client on a mainframe that just would not consider a change.
You have 2 choices:
(1) Write a channel exit or
(2) Do not use JMS but rather MQ base Java
At the client, they decided to go with option #2.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
wschutz |
Posted: Tue Aug 30, 2005 10:24 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
vibhu007, I assume you are using JMS as a "client" If I'm wrong, ignore the rest of this post.
Normally, the easiest place to fix up a MQMD is via a channel "message" exit that gets envoked each time a message is sent (or received) across the channel. However, this exit is not available on MQ client channels. So, to use a channel exit you will have to use either a "send" or "receive" exit. Now, its technically possible to fix up the MQMD from these exits, but it quite a bit more difficult (you need to know quite a bit about how exists work to do this).
So, as Roger says, consider using the MQ native classes _________________ -wayne |
|
Back to top |
|
 |
vibhu007 |
Posted: Tue Aug 30, 2005 3:26 pm Post subject: |
|
|
Newbie
Joined: 29 Aug 2005 Posts: 6
|
Thanks a lot. I will go for native. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 30, 2005 8:15 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Or as alternative use a message that does not require this information to be in the header... but have it in the payload ??
Enjoy
 |
|
Back to top |
|
 |
|