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 IndexGeneral IBM MQ SupportChannel exit to remove an RFH2 header.

Post new topicReply to topic Goto page 1, 2  Next
Channel exit to remove an RFH2 header. View previous topic :: View next topic
Author Message
afjt
PostPosted: Mon May 19, 2003 5:10 am Post subject: Channel exit to remove an RFH2 header. Reply with quote

Newbie

Joined: 16 May 2003
Posts: 6
Location: Crewe, Cheshire, UK

We are currently replacing mqsi with wmqi v2.1, and using the publish/subscribe. This means that the message generated will have an RFH2 header on the front. However, the system which is receiving these messages is not expecting such a header, and it is not ours to amend.
Therefore, we need write a channel exit program to remove the RFH2 header before it reaches the receiving system. Is such a program already freely available, or must be write our own ? I can't believe we are the first people to have such a requirement !
Back to top
View user's profile Send private message Send e-mail
vmcgloin
PostPosted: Mon May 19, 2003 5:24 am Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

There is no reason why the messages should have an RFH2 header when sent to the subscribers. It can be removed by the message flow, or possibly not generated at all depending on what you are doing.

In a compute node you need only copy the message body and MQMD or all required headers, except MQRFH2.

If you are using a jms publisher you can specify a non-jms targetClient.

If you still have problems then give more details about what you are doing and or your flow, and I'm sure someone will help.

Cheers,
Vicky
Back to top
View user's profile Send private message
afjt
PostPosted: Mon May 19, 2003 5:51 am Post subject: Reply with quote

Newbie

Joined: 16 May 2003
Posts: 6
Location: Crewe, Cheshire, UK

I'm not sure if it can be removed by the message flow, as the wmqi 'publish' node, (which is the last node in the flow), requires that the message has an rfh2 header as this contains the topic etc for for the publication.
There are no options or parameters on the publish node to remove this rfh2 header, so the resulting message will still have it on.

Perhaps I should have posted this in the wmqi forum instead / as well ?
Back to top
View user's profile Send private message Send e-mail
vmcgloin
PostPosted: Mon May 19, 2003 6:01 am Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Ah, sorry. You are right. I was thinking of you using a default topic.

Last edited by vmcgloin on Mon May 19, 2003 6:19 am; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 19, 2003 6:15 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

From the Programming Guide:
Quote:
Messages that have not been built by a publisher as described in “The publisher” on page 15, and therefore do not contain an MQRFH2 header, can also be sent to subscribers even though the messages do not have the usual information needed to make a routing decision. This is done by setting the Topic property on the input node. If a message arrives at the input node’s queue and does not have an MQRFH2 header that contains a <psc>folder, the message is treated as if it was a Publish command with this default topic. The message is sent to subscribers who have registered for the default topic.
Notes:
1. The default topic is not be added to the message; the message is processed as if it contained the topic. The subscriber receives the original message with no MQRFH2 <psc>folder.
2. This type of message is handled as if it were declared with the ‘local’ publish option. The message is not forwarded to neighboring brokers, even if they have subscribers registered on matching topics.
3. Response messages are not sent to publishing applications that produce
messages in this way, even if the MQMD is set to imply that responses should be sent.
4. Existing WebSphere MQ Publish/Subscribe applications that use MQRFH
format subscriptions do not receive these messages.
pages 17 and 18.

My emphasis added.


Last edited by jefflowrey on Mon May 19, 2003 7:19 am; edited 1 time in total
Back to top
View user's profile Send private message
afjt
PostPosted: Mon May 19, 2003 6:52 am Post subject: Reply with quote

Newbie

Joined: 16 May 2003
Posts: 6
Location: Crewe, Cheshire, UK

Thanks for that, but I don't think it will help here, as we have several dozen different topics, and so we definitely need the <psc> folder to identify which is the topic in question, as we can't just use the default topic.
Back to top
View user's profile Send private message Send e-mail
rajmq
PostPosted: Tue May 20, 2003 3:32 am Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi to all

" I can't believe we are the first people to have such a requirement !"

Abosutly wrong!!!

We can solve this problem in two ways

1.After publishing the message, don't send the message to ur receiving application,u can send that message to other Message flow like...
MQInputNode------->ComputeNode--------->MQOutputNode
From the above computenode u can remove rfh2 info..

2.the other way u can control ur host application program itself,(trim rfh2 header info and read)

Hope this will help

raj
Back to top
View user's profile Send private message
afjt
PostPosted: Tue May 20, 2003 5:56 am Post subject: Reply with quote

Newbie

Joined: 16 May 2003
Posts: 6
Location: Crewe, Cheshire, UK

Thanks for that. Not sure if either option will help though.
1) We have a number of different subscribers - the actual number of which is not fixed. Each such subscriber queue would then have to have its own flow purely to remove the rfh2 header. This means we lose the flexibility of using publish/subscribe, where new topics and subscribers can be added without actually amendint any flows.
2) I think you are suggesting that we could amend the receiving application. This is not an option, as this code is not written or supported by us, and so cannot be changed.
Back to top
View user's profile Send private message Send e-mail
dp111443
PostPosted: Thu Apr 05, 2007 5:22 am Post subject: Reply with quote

Voyager

Joined: 25 Feb 2004
Posts: 82

This post is going way back...but funnily enough...we would like to do a similar thing.

We have legacy applications that do not check for MQRFH2 headers. We are also using Pub/sub to route data to subscription queues. We are currently trying to find out if it is possible to remove the MQRFH2 header on the message that is outputted to the subscribed queue.

Using a flow would not be an option as the flow is currently publishing the messages with the MQRFH2 header info for the broker to route to the output queues. We have lots of subscription queues on the output.

anybody have any idea's?

thanks
Dharmesh
_________________
Integration Design/Developer

IBM Certified System Administrator -
WebSphere MQ V5.3
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 05, 2007 5:32 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's possible to do, but I don't remember how.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dp111443
PostPosted: Thu Apr 05, 2007 5:49 am Post subject: Reply with quote

Voyager

Joined: 25 Feb 2004
Posts: 82

Anybody have any other idea's.

I did find a post where there were a few options...one of them sounded useful...

". In case you don't have RFH2 header you can just set the topic in ESQL Root.Properties.Topic = xxx"...

but i beleive this is no good if you have a collective. If your pub/sub ing on the same broker, then this is a viable option.

anymore idea's would be greatly recieved.

cheers,
_________________
Integration Design/Developer

IBM Certified System Administrator -
WebSphere MQ V5.3
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 05, 2007 5:57 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, that's what I remembered - about setting the Topic in properties instead of the MQRFH2.

But let's be clear about what you're trying to do - you're trying to send messages to different topics without giving the broker any reasonable means of knowing what topic you're publishing on.

So your choices are very limited, and they probably do not scale up nor scale down (you might not be able to do this with the base MQ broker at all).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dp111443
PostPosted: Thu Apr 05, 2007 6:09 am Post subject: Reply with quote

Voyager

Joined: 25 Feb 2004
Posts: 82

Hi,

not 100% sure I understood your response.

We are building the topic tree in the broker and then using the publish node to publish the message. I agree with you that this information needs to be in the message(MQRFH2) inorder for the broker to route it correctly to the output queue. ...but at the point where it puts the message on the subscription queue, I was hoping there is something that could be done to dispose the MQRFH2 header.

Having a flow on the other end is no good as we could have lots of subscription queues that the topic will put to as we create this dynamically.

maybe i'm asking for a miracle )

cheers anyway!
_________________
Integration Design/Developer

IBM Certified System Administrator -
WebSphere MQ V5.3
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 05, 2007 6:21 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

So if I've got this correctly, you're publishing stuff via a WMB broker, doing routing based on the value in the RFH2 header then publishing it out where it's subcribed to by a non-RFH2 aware application. So you need to route the messages through the broker with the RFH2 on the message and then publish them without an RFH2 header?

Yes?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
dp111443
PostPosted: Thu Apr 05, 2007 6:27 am Post subject: Reply with quote

Voyager

Joined: 25 Feb 2004
Posts: 82

Hi Vitor, pretty much yes!

the only thing i should clarify is when the message comes into the broker there is no RFH2 header. We basically build the topic tree in the broker based on some content of data.

then publish it using publish node.

the subscription is on a non-RFH2 aware app.

and yes we do want to publish the message without the header.

thanks,
_________________
Integration Design/Developer

IBM Certified System Administrator -
WebSphere MQ V5.3
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexGeneral IBM MQ SupportChannel exit to remove an RFH2 header.
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.