Author |
Message
|
Empeterson |
Posted: Wed May 14, 2003 7:51 am Post subject: Message grouping dilemma... |
|
|
Centurion
Joined: 14 Apr 2003 Posts: 125 Location: Foxboro, MA
|
Here is my dilemma:
I have a group of messages coming in. The first message in the group is an XML message that I will be doing some processing on. The rest of the messages I will just be passing to the output as binary data. I will be looking at the incoming XML for a specific tag. If it exists, all message in the group need to be routed to one queue. If the tag does not exist, all messages in the group need to be output to a different queue. The problem I seem to be encountering, is that the subsequent messages in the group have no idea to what queue I outputted the first message to. How can I pass that info on to the next message? Is there some sort of Group Environment tree to use (and if not, any idea if IBM has plans to implement such a thing)? Or do I need to use a warehouse node and store some flags?
FYI: Running 2.1, csd4 on win2k, aix.
Thank you. |
|
Back to top |
|
 |
kirani |
Posted: Wed May 14, 2003 9:44 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Currently, the scope of all tree's in WMQI is restricted to one message only. You need to use some kind of persistent storage to store information, which will allow you to share data between different messages.
You have multiple options
1) Write queue name on some temp queue and then use MQGET node to retrieve it for subsequent messages.
2) Store your queue name into DB, which will be retrieved by other messages.
Hope this helps. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Empeterson |
Posted: Wed May 14, 2003 11:01 am Post subject: |
|
|
Centurion
Joined: 14 Apr 2003 Posts: 125 Location: Foxboro, MA
|
The only plugin node called MQGET I see is for v2.02. Will this work with 2.1? |
|
Back to top |
|
 |
kirani |
Posted: Wed May 14, 2003 12:15 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Yes it does! If you are going to recompile the code with 2.1 libraries then you might have to make small changes in the source code. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Empeterson |
Posted: Wed May 14, 2003 12:33 pm Post subject: |
|
|
Centurion
Joined: 14 Apr 2003 Posts: 125 Location: Foxboro, MA
|
What changes would those be and how hard would they be to do for a novice C++ programmer (I assume the node is written in C++). |
|
Back to top |
|
 |
kirani |
Posted: Wed May 14, 2003 12:54 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
The MQGet node is written in C langauge. The changes are very simple.
The following structures should be declared using the supplied initializers as follows:
Code: |
static CNI_VFT vftable={CNI_VFT_DEFAULT};
static CPI_VFT vftable={CPI_VFT_DEFAULT};
CCI_EXCEPTION_ST exception_st={CCI_EXCEPTION_ST_DEFAULT};
CNI_BROKER_INFO_ST broker_info_st={CNI_BROKER_INFO_ST_DEFAULT};
|
Once you make these changes, just recompile your code and it will work fine. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Empeterson |
Posted: Wed May 14, 2003 1:02 pm Post subject: |
|
|
Centurion
Joined: 14 Apr 2003 Posts: 125 Location: Foxboro, MA
|
Please forgive my ignorance as I have had only a minimal amount of training in C/C++ and havent done much in the way of complex programs. I assume these changes are to be made in MQGET.c? I am looking at the source now and can honestly say I have no clue where to place that code. Thanks for your assistance and patience.  |
|
Back to top |
|
 |
kirani |
Posted: Wed May 14, 2003 1:14 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
No problem.
I think, there is only one place where you need to make this change, bipGetMessageflowNodeFactory() function.
Code: |
static CNI_VFT virtualFunctionTable={CNI_VFT_DEFAULT};
|
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Empeterson |
Posted: Wed May 14, 2003 1:29 pm Post subject: |
|
|
Centurion
Joined: 14 Apr 2003 Posts: 125 Location: Foxboro, MA
|
So, do I take those 4 lines of code above and insert them in after that line or in place of that line? |
|
Back to top |
|
 |
kirani |
Posted: Wed May 14, 2003 1:38 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Sorry If I wasn't clear enough. In your MQGet.c file, search for virtualFunctionTable token and then replace that line with following code:
Code: |
static CNI_VFT virtualFunctionTable={CNI_VFT_DEFAULT};
|
Don't worry about the 4 lines that i posted earlier. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|