Author |
Message
|
EricL |
Posted: Mon Dec 22, 2014 11:51 am Post subject: The best way to verify messages are in validate format |
|
|
Centurion
Joined: 10 Oct 2014 Posts: 102
|
Hi,
When problems happened in the system, I normally need to check if the messages are in good format or if the messages are completed, would like to know what's the best way of doing that to verify single or multiple messages in a very efficient way?
Thanks
Eric |
|
Back to top |
|
 |
PaulClarke |
Posted: Mon Dec 22, 2014 12:05 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I think you probably need to give us a few more details. Are you concerned about the efficiency of accessing the messages or the actual format verification? What format are the messages in? What sort or size are they and how many are we talking here? What problem are you trying to solve....why is not just using something like the backout count sufficient? _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 22, 2014 1:29 pm Post subject: Re: The best way to verify messages are in validate format |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
EricL wrote: |
what's the best way of doing that to verify single or multiple messages in a very efficient way? |
Have WMB/IIB verify the messages when it first reads them. If they're rejected then the format is the problem. If they fail further downstream it's not the format that's the issue. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
EricL |
Posted: Mon Dec 29, 2014 6:44 am Post subject: The best way to verify messages are in validate format |
|
|
Centurion
Joined: 10 Oct 2014 Posts: 102
|
Thanks guys, for your response.
The concern is the format verification of a message, eg, if the message is a valiad message in XML format.
Currently we have to massage the XML message a bit in order to show it in browser, so that it is shown in a readable XML format to help quickly figure out if the message is valide by matching elements, e.g <from> must end with </from>, <version> must end with </version>, sometimes, it takes lot of time when the message is long, and the worst, after adding say <?xml version="1.0" encoding="UTF-8"?> at the begining of the message, the message not able to be shown in browser as a xml message.
just would like to know if there is more efficiency way of doing xml message format validation?
Thanks
Eric |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 29, 2014 7:06 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
What browser? The MQExplorer? Firefox? Something else? _________________ 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 |
|
 |
JosephGramig |
Posted: Mon Dec 29, 2014 7:43 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Did you try browsing the msgs with RfhUtil or RfhUtilC and check the XML radio button on the Data Format grouping? |
|
Back to top |
|
 |
EricL |
Posted: Mon Dec 29, 2014 12:22 pm Post subject: The best way to verify messages are in validate format |
|
|
Centurion
Joined: 10 Oct 2014 Posts: 102
|
Hi Bruce, I'm talking by using MQExplorer, as if the xml message formatted well, it should be shown in MQExplorer indented properly, otherwise, it is not a valid message, but it sometimes takes very long time.
Hi Grand, I did try browsing message using RfhUtil, it works, but when browse a very big queue, say with >15000 msgs in a queue, think we have to download the queue to local and check related messages as RfhUtil doesn't support browsering 10000th and above messages, again, not so efficient, that's why I posted the question here.
Eric |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 29, 2014 1:00 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
MQExplorer doesn't include any function for validating messages. It includes some basic function for viewing the data in a message. With additions from MS0P you have some additional tools in that regard.
For this particular case, what you really want, though, is something that will browse all of the messages on the queue, rapidly, and report back which one, if any, are "bad", for some criteria of 'bad'.
this is best done by a standalone application of some kind. It'd be pretty straight forward to modify one of the java sample programs to validate the data using an XML processor. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Dec 29, 2014 1:57 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you already have / own IIB a simple pre-processing flow can weed out the non XML messages and put them on an Error queue for analysis...
Just enhancing messges going to the failure terminal with the Exception List info, should also bring more straight information to your setup. Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Jan 05, 2015 2:02 pm Post subject: Re: The best way to verify messages are in validate format |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
EricL wrote: |
but when browse a very big queue, say with >15000 msgs in a queue, think we have to download the queue to local and check related messages as RfhUtil doesn't support browsering 10000th and above messages, again, not so efficient, that's why I posted the question here. |
Please have a look at MQ Visual Edit. It can look at any message in the queue including the 15001th message.
In MQ Visual Edit, click Edit -> Preferences
- Set 'Max. number of messages to retrieve' to 25000 (i.e. more than the number of messages in the queue)
- Also, change 'Max. size of each message to retrieve' to a low value (i.e. 100) otherwise MQ Visual Edit will run out of memory. Note: This does NOT affect the viewing of the message.
You can simply double click on the message to get the standard Message Edit window. Or highlight the message then click Edit -> Edit Message (or Edit Message with XML Editor to go directly to the XML Editor).
MQ Visual Edit does not care if the XML Prolog is present or not. It will invoke the XML Parser (Xerces) and display the XML tree if there are no errors.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
PaulClarke |
Posted: Mon Jan 05, 2015 2:56 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Needless to say MO71 can also browse, display, copy, move, delete and unload (and then reload) messages on queues this deep with ease.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
|