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 » Collector node

Post new topic  Reply to topic
 Collector node « View previous topic :: View next topic » 
Author Message
RAJESHRAMAKRISHNAN
PostPosted: Sat Sep 28, 2013 12:07 am    Post subject: Collector node Reply with quote

Voyager

Joined: 01 May 2004
Posts: 96

Hello All

We are using Collector node to batch messages belonging to certain type, identified by correlid. We have connected the exception terminal of the Collector node to a Exception handler, that would separate the Message body and exception tree before writing to a file.

This doesn't work under certain scenario (e.g invalid unicode characters), where our exception handlers throw an exception resulting in the mesage flow going in a loop. Is there a way to handle collector node exceptions in a generic way for every kind of exception (for example converting the entire Collection to a blob)? Not able to find a way to get around this. Please help

Thanks
Rajesh
Back to top
View user's profile Send private message
RAJESHRAMAKRISHNAN
PostPosted: Sat Sep 28, 2013 12:46 am    Post subject: Reply with quote

Voyager

Joined: 01 May 2004
Posts: 96

Just wanted to let you know that we are using XMLNSC domain
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sat Sep 28, 2013 12:51 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

There are two thinks I'd do (based upon my experience with the Collector Node)

1) Validate (content and value) the messages BEFORE they are added to the collection
2) Don't connect the Catch terminal to anything but a Passthru Node.
Instead connect the Out Terminal to a TryCatch Node and handle errors there.

IMHO it is far better to reject a message if it has things like 'Invalid Uncode' chars BEFORE it is added to a collection. IF you are seeing cases like this then you need to go to the senders and get them to fix the problems in the data they are sending you.

converting the messages to a BLOB will IMHO only postpone the problems you are going to encounter with the data.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sat Sep 28, 2013 6:09 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There's documentation on when not to connect the catch terminal of the Collector node, and why.

As my esteemed colleague mentions, validate data BEFORE it gets into the collection. If you need to allow the collection to complete even if some messages are invalid, create a known "invalid message received" message that you can test against, but will still complete the collection.

Also, please consider if you're trying to use Collector as an asynchronous Aggregation pattern instead of an independent input Collector pattern- and try to use Aggregation instead.
Back to top
View user's profile Send private message
RAJESHRAMAKRISHNAN
PostPosted: Sat Sep 28, 2013 8:38 am    Post subject: Reply with quote

Voyager

Joined: 01 May 2004
Posts: 96

Thank you very much for the quick reply. The Collector node gets messages only from other message flows and not directly from sending applications. We just wanted to make sure that error handling works fine in any situation. Therefore receiving invalid characters may not happen in practice. This particular flow is a generic one where it would not be knowing the message type that it is processing therefore validating the message against a message type is not an option (Though with some difficulty it can be done).

We don't want to loose the message even if there are invalid characters. So how do we achieve this considering the fact that the message can't be validated for content and value.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sat Sep 28, 2013 9:55 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Read the message as a BLOB and use that.

However, if the message is invaid (with bad format or characters) the general concensus of opinion here is that there is not a lot you can do with it.
Unless you don't need to use the content of the message at all..............????

To minimise potential problems I'd do the following

1) Get the emitting flows to validate their messages before they get sent using a message set (pre V or a schema (V8 onwards).
2) Validate the incoming messages for content and value.
3) Throw the bad messages onto a Backout Queue and make sure your management knows that is the responsibility of the sending application/message flow to send data that is valid.
4) Don't try to 'fix' any bad messages. This is the top of a slippery slope that you should not even begin to go down. Think of the saying, 'Now long is a piece of string'. you don't know.

As the data is coming from other flows then how hard is it to get them to make sure that the data is valide before they send it to your flow.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
RAJESHRAMAKRISHNAN
PostPosted: Sat Oct 26, 2013 10:27 pm    Post subject: Reply with quote

Voyager

Joined: 01 May 2004
Posts: 96

Thanks for the help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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