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 Discussion » modifying message header using channel exit

Post new topic  Reply to topic
 modifying message header using channel exit « View previous topic :: View next topic » 
Author Message
vibhu007
PostPosted: Mon Aug 29, 2005 9:14 pm    Post subject: modifying message header using channel exit Reply with quote

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
View user's profile Send private message
Mr Butcher
PostPosted: Mon Aug 29, 2005 10:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
vibhu007
PostPosted: Tue Aug 30, 2005 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Tue Aug 30, 2005 10:15 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
wschutz
PostPosted: Tue Aug 30, 2005 10:24 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
vibhu007
PostPosted: Tue Aug 30, 2005 3:26 pm    Post subject: Reply with quote

Newbie

Joined: 29 Aug 2005
Posts: 6

Thanks a lot. I will go for native.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 30, 2005 8:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » modifying message header using channel exit
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.