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 » Can a channel exit route messages ?

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 Can a channel exit route messages ? « View previous topic :: View next topic » 
Author Message
warelock
PostPosted: Sat Jun 19, 2010 6:01 pm    Post subject: Can a channel exit route messages ? Reply with quote

Novice

Joined: 18 Jun 2010
Posts: 19

Hope someone can advise me !

We want to use channel exits to route messages to different queues depending on the content of the message.

I've spent the last few days deep in the Intercommunications manual and writing my first channel exit (MSGEXIT) with C an AIX. I understand how to parse the transmission header and get to the message data. Well, at least I can get the exit program to work and find the message data we need to determine routing! I think real understanding might take more time

What I can't figure out is how to route the message ! The Intercommunications manual doesnt say anything about this that I can find. I'm not even sure this is possible ... can I do this?

The other thought we had was that perhaps we could set a correlation ID or a message ID (or perhaps application ID?) using the channel exit and then allow the message to continue ... but the only place I've seen any discusson of that is in these forums, and it sounded like altering the application ID, at any rate, might not be a good idea.

Is it possble to do this at all with a channel exit? Any suggestions on other ways I can educate myself?

I appreciate your time !!
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat Jun 19, 2010 7:11 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9396
Location: US: west coast, almost. Otherwise, enroute.

How did you decide on using a channel exits to alter the destination queue?

Did you consider any other methods?

Have you researched writing channel exits in the WMQ Application Programming Guide?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jun 19, 2010 7:11 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

We suggest you use for that an application. A few come to mind (WMB, WAS ESB, etc...) and for the poor man a home grown routing app...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Sat Jun 19, 2010 7:15 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9396
Location: US: west coast, almost. Otherwise, enroute.

Quote:
a home grown routing app...

Which means not a channel exit. Exits are complicated; and if poorly coded can cause the channel to fail, or corrupt the message. This would be my last choice for content-based routing.

The WebSphere Message Broker does message routing (and message data transformation) for a living; and it does a spectacular job.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
warelock
PostPosted: Sun Jun 20, 2010 7:42 am    Post subject: channel exits for content-based routing Reply with quote

Novice

Joined: 18 Jun 2010
Posts: 19

bruce2359 wrote:
How did you decide on using a channel exits to alter the destination queue?

Did you consider any other methods?

Have you researched writing channel exits in the WMQ Application Programming Guide?


Thanks guys !

1) Our manager wants to knows if this is possible. It will be hard to compare this method with others until we understand it.

2) Yes. We have been using Message Broker and TIBCO, for instance. We are likely unaware of some of the other options! Do you have something specific in mind? We'd be glad to know about more alternatives. Our goal right now is to do this in MQ without using Message Broker.

3) Yes, the Application Programming Guide gave me some info on the data structures i used in the channel exit i have written. it does not, unfortunately, answer my question about whether we can route messages with a channel exit.

If i understand what you guys are posting ... it sounds like you are not sure whether this is possible, and you're warning me that writing channel exits is diificult and dangerous ... is that the gist of it ?

thanks !!
Back to top
View user's profile Send private message
exerk
PostPosted: Sun Jun 20, 2010 8:36 am    Post subject: Re: channel exits for content-based routing Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

warelock wrote:
2) Yes. We have been using Message Broker and TIBCO, for instance. We are likely unaware of some of the other options! Do you have something specific in mind? We'd be glad to know about more alternatives. Our goal right now is to do this in MQ without using Message Broker...


A flow in Broker is going to be a lot let hassle than an exit, and more easily changed/enhanced
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Jun 20, 2010 1:06 pm    Post subject: Re: channel exits for content-based routing Reply with quote

Grand High Poobah

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

warelock wrote:
If i understand what you guys are posting ... it sounds like you are not sure whether this is possible, and you're warning me that writing channel exits is diificult and dangerous ... is that the gist of it ?


Exits are indeed difficult & dangerous, and the total cost of developing & maintaining such a solution will be much higher than a broker flow.

As to turning to the possibility, let's reverse the question. Given where a channel exit runs & what it can do, what makes you think it's possible to route messages with one? How (in an ideal world) would your exit work?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Jun 20, 2010 1:25 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There's simply no good reason to do this at the channel exit level at all.

What is the meaningful and business-justified reason for not letting the message land on an intermediate queue before the final destination queue?

Performance? You'd have to have tuned everything else to at least 3 9's before it is reasonable to think of looking at this.

The more time you spend trying to make software work "like magic", the more it actually does - randomly, undeterminably and unsupportably.
Back to top
View user's profile Send private message
warelock
PostPosted: Tue Jun 22, 2010 9:54 am    Post subject: Reply with quote

Novice

Joined: 18 Jun 2010
Posts: 19

mqjeff wrote:
There's simply no good reason to do this at the channel exit level at all.

What is the meaningful and business-justified reason for not letting the message land on an intermediate queue before the final destination queue?

...


mqjeff, that is an interesting suggestion !

Our business goal is to route messages to different queues depending on the content of the message. We don't want to use MQSI, and we do want to do this with MQ facilities. However, we are not blindly commited to doing this with channel exits - other approaches would be great !

Can you tell me how we would do this with intermediate queues? I do not understand this scenario ...

thanks !!
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jun 22, 2010 9:58 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9396
Location: US: west coast, almost. Otherwise, enroute.

Alter your queue definitions so that all (relevant) messages end up on a local queue called get_and_reroute. Write an application that gets each message, determines where the message should really go, mqput it to the queue where it belongs.

The message broker product does this; and you can imbed error-handling. Why would you want to write your own?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
warelock
PostPosted: Tue Jun 22, 2010 10:04 am    Post subject: Reply with quote

Novice

Joined: 18 Jun 2010
Posts: 19

bruce2359 wrote:
Alter your queue definitions so that all (relevant) messages end up on a local queue called get_and_reroute. Write an application that gets each message, determines where the message should really go, mqput it to the queue where it belongs.

The message broker product does this; and you can imbed error-handling. Why would you want to write your own?


bruce2359, by 'write an application' do you mean write an application in Message Broker? I'm assuming you do not mean that, but are instead referring to a program that polls the queue and combines mqget and mqput to reroute ... ?

Part of the reason we dont want to use Message Broker is the licensing cost ... but I am not aware of all the reasons, because I am not a manager, so that is not necessarily all there is to it. I understand why you'd ask the question !
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jun 22, 2010 10:09 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9396
Location: US: west coast, almost. Otherwise, enroute.

No. I mean write an application using the native MQI calls or Java or C, or whatever language you choose.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 22, 2010 10:13 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Message Broker makes this kind of thing dead easy to write and terribly reliable.

But it is rather a heavy-weight and more costly solution if all you need to do is route messages based on dead-simple criteria to two or three queues.

But the more work you have to put into understanding the contents of the message before you can know which queue it goes to, the more value Broker brings to the table. Particularly if you have to actually change the message in any way as you route it to other queues.

But bruce2359 is right that this is straight forward to do with any MQ API from any language of your choice, and he is discussing exactly what I meant when I said "use an intermediate queue".
Back to top
View user's profile Send private message
warelock
PostPosted: Tue Jun 22, 2010 10:25 am    Post subject: thanks Reply with quote

Novice

Joined: 18 Jun 2010
Posts: 19

gents, i thank you for your advice. we were hoping that channel exits would provide a alternative to straight programming that would provide better performance ... we'd certainly be able to write a C program to do this, but if we reach that point we are probably better off with MEssage Broker (as of course you are pointing out).
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 22, 2010 10:34 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

As I said, doing this at the channel exit level in order to increase performance is way down the list of performance tuning items. You'd have to have done a whole lot of other things first, and maxed the gain from those things out.

The only kind of situation where you'd really want to do this at the channel exit level would be something like millions of messages a second.

And then you're probably better off switching to a faster networking protocol - MQLLM or etc - than by writing an MQ channel exit.

And don't mistake a channel exit for being anything other than 'A c program'.... so if you have to write a C program either way, you're far better off writing it as a plain MQ app that is much more visible as an application than a channel exit would be.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » User Exits » Can a channel exit route messages ?
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.