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 » WebSphere Message Broker (ACE) Support » MQInput node

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 MQInput node « View previous topic :: View next topic » 
Author Message
angka
PostPosted: Thu Sep 14, 2006 12:27 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

My input message is text(no format). I didnt set any message domain in the MQInput node and broker will parse my message body to BLOB and so my InputBody is in BLOB. so do i SET OutputRoot.BLOB = InputBody;? I try setting this, but when the message leave the Compute node, the MQRFH2.mcd.Msd become blank..

Actually my MQ server is supposed to receive messages in text(MQSTR) to Queue A and then the MQInput node will pick up from Queue A and do some computation to determine what Message Type it belongs to. After adding in the MQRFH2 header(setting the message domain, message set, etc), the MQOutput node will put the message to Queue B. Then another MQInput node will pick up from queue B and mapped it to XML.

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Sep 14, 2006 12:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

If this is your requirement...
Quote:
Actually my MQ server is supposed to receive messages in text(MQSTR) to Queue A and then the MQInput node will pick up from Queue A and do some computation to determine what Message Type it belongs to. After adding in the MQRFH2 header, the MQOutput node will put the message to Queue B. Then another MQInput node will pick up from queue B and mapped it to XML.
...then I think there's a much simpler way to achieve it. You do not need two message flows, and you do not need to construct an MQRFH2 header anywhere in your message flow.

MQInput - Domain = BLOB
Compute - Cast input as char, analyse the bitstream to determine the message type, use CREATE FIELD...PARSE with the DOMAIN clause and supply the appropriate message type.

That will get the message parsed correctly. Serializing as XML should be trivial after that. I presume you are using the MRM TDS format to parse the text?
Back to top
View user's profile Send private message
angka
PostPosted: Thu Sep 14, 2006 1:40 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

kimbert: Think this may work for me because there are many different type of input text. it may increase in the future. and if there is a new type i will need to add lint to the code. i am using the model tt i mention because if there is a new type i just need to add on to my .mxsd definition. I am using the Custom Wired Format. Thanks
Back to top
View user's profile Send private message
supreeth
PostPosted: Thu Sep 14, 2006 2:32 am    Post subject: Reply with quote

Voyager

Joined: 17 May 2005
Posts: 90
Location: London

Hi,

From the code i have put in my earlier mail, replace

OutputRoot.XML = InputBody with

OutputRoot.BLOB.BLOB = InputBody.BLOB;


cheerz!!!
supreeth
_________________
Supreeth Gururaj
IBM Certified WMQ Solution Expert
Back to top
View user's profile Send private message
angka
PostPosted: Thu Sep 14, 2006 2:43 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

I tried, it is still the same. the OutputRoot.MQRFH2.mcd.Msd become none. this looks simple but dunno why i am stuck so long. Thanks..
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Sep 14, 2006 3:01 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Quote:
i am using the model tt i mention because if there is a new type i just need to add on to my .mxsd definition
Fair point. I agree that maintainability is important here. All the same, I think there must be a better way.
Have you looked at the embedded message support in v6? You can identify the body of a message using one of the fields in the header. Search for 'Message Identity' in the docs. If you use this technique, you get maintainability AND performance.
Back to top
View user's profile Send private message
supreeth
PostPosted: Thu Sep 14, 2006 3:19 am    Post subject: Reply with quote

Voyager

Joined: 17 May 2005
Posts: 90
Location: London

yups angka ... u r right ... looks like a bug. Theres a stray tag created which is named Format in the same level as mcd. Guess some problem with using BLOB. Try raising a PMR. I guess its an eligible issue to raise PMR

cheerz!!!
supreeth
_________________
Supreeth Gururaj
IBM Certified WMQ Solution Expert
Back to top
View user's profile Send private message
supreeth
PostPosted: Thu Sep 14, 2006 9:30 pm    Post subject: Reply with quote

Voyager

Joined: 17 May 2005
Posts: 90
Location: London

hey,
its logical. u cant parse the incoming message as BLOB or XML and set message details in MQRFH2. It would be reset accordingly. Should have understood it earlier

what you can probably do is redesign your message flow. I dont see any need for you to have 2 message flows.

kimbert's idea makes perfect sense here.

Quote:

MQInput - Domain = BLOB
Compute - Cast input as char, analyse the bitstream to determine the message type, use CREATE FIELD...PARSE with the DOMAIN clause and supply the appropriate message type.

That will get the message parsed correctly. Serializing as XML should be trivial after that. I presume you are using the MRM TDS format to parse the text?


Quote:

Think this may work for me because there are many different type of input text. it may increase in the future. and if there is a new type i will need to add lint to the code. i am using the model tt i mention because if there is a new type i just need to add on to my .mxsd definition. I am using the Custom Wired Format.


couldn quite get as what issues you would have. i guess using the esql the details can be set dynamically. i mean ... cudn quite get ur problem


I guess you can just go ahead with the above design.t would be generic to suit your needs and also would work without an issue

cheerz!!!
supreeth
_________________
Supreeth Gururaj
IBM Certified WMQ Solution Expert
Back to top
View user's profile Send private message
angka
PostPosted: Fri Sep 15, 2006 1:32 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

Is there a way not to parse the incoming data message as any domain (remain as text) and then set the message details in MQRFH2?

MQRFH2 isn't it a header for the MQInput node to parse the message accordingly? when the message is put to a queue all the logical tree will be gone also. I used rhfutil it can work even when the message body is not in the format of the MQRFH2 setting. Why did it reset the setting?

Btw, I have already submitted a PMR. =) IBM going to shoot me. Thanks
Back to top
View user's profile Send private message
angka
PostPosted: Fri Sep 15, 2006 1:38 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

kimbert: I have not look at that yet. Are you referring MQMD message id as the "message identity"?

Actually All the system that is going to connect to my server is already running live now so it is not possible for them to include anything more.
Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Sep 15, 2006 2:05 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Quote:
Is there a way not to parse the incoming data message as any domain (remain as text)
If you don't want to parse the message, use the BLOB domain.
Quote:
and then set the message details in MQRFH2?
In your case, I see no reason to add an RFH2 header in the middle of a message flow. See my previous post
Quote:
MQRFH2 isn't it a header for the MQInput node to parse the message accordingly?
If an incoming message has an MQRFH2 header with an mcd folder, the message properties will be set from its Domain/Set/Type/Fmt fields, overriding any settings on the Default tab of the input node.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Sep 15, 2006 2:12 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Quote:
Are you referring MQMD message id as the "message identity"?
No. I'm referring to an MRM feature introduced in v6, because I think it may help you. http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ad00761_.htm

I'm assuming that your input messages have some kind of identifier near the start. That's your 'Message Identifier'. You can use it to make the MRM parser automatically select the correct message definition for the remainder of the message.
Back to top
View user's profile Send private message
angka
PostPosted: Sun Sep 17, 2006 7:57 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

kimbert: My only identifier of each message is in the MQMD Correlation ID. thanks. I will take a look.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Sep 17, 2006 2:41 pm    Post subject: Reply with quote

Grand High Poobah

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

angka wrote:
Hi,

kimbert: My only identifier of each message is in the MQMD Correlation ID. thanks. I will take a look.


If this is the case and we are not talking about a reply (see MQ Get node in V6) you can use the first flow as routing and keep the correlation Id.

In the subsequent flows use a compute node and use what kimbert told you:
Create ... Domain .... Parse...

This should reduce the number of message sets needed in the single routing node to none ?

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Sep 18, 2006 12:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

Quote:
My only identifier of each message is in the MQMD Correlation ID
In that case, you cannot use the technique I was suggesting - the MRM Message Identifier needs to be in the body of the message.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next Page 2 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQInput node
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.