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 » Distinct values in Message broker

Post new topic  Reply to topic
 Distinct values in Message broker « View previous topic :: View next topic » 
Author Message
GeneRK4
PostPosted: Wed Feb 12, 2014 5:10 pm    Post subject: Distinct values in Message broker Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

Hi,
I have a queue with many error messages ,with error reason in MQRFH2.usr folder.I need to design a flow which will provide a list of distinct error reasons (taken from usr folder).
The list ,I can get in any form such as file or a variable or some other means.But I dont want to use Database.
I am not able to think of shared variables which would be shared across all messages running in a flow because,while the messages are running through the flow,if the flow gets stopped for any cause,then the shared variable will loose the data.
If I write in file for each message,it may contain duplicate error reasons.And I guess we need to again fetch the records in the file and find out the distinct errors.
Please suggest some good design for this solution.
Back to top
View user's profile Send private message
Gralgrathor
PostPosted: Thu Feb 13, 2014 1:52 am    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

Let the errorhandler flow append *all* the messages to a file (or files, possibly using java.util.logging icm a rolling appender). Then write a second flow that consumes these files on demand, and produces a summary.

On another note: why are you opposed to using a database? Using a database would greatly simplify the solution. It would be similar, only you wouldn't need a second flow: a simple query to the database would be sufficient.
Back to top
View user's profile Send private message Send e-mail
Simbu
PostPosted: Fri Feb 14, 2014 3:41 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

you can achieve it using java with minimal code. Refer http://stackoverflow.com/questions/13429119/get-unique-values-from-arraylist-in-java
Back to top
View user's profile Send private message
Gralgrathor
PostPosted: Fri Feb 14, 2014 4:36 am    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

Simbu wrote:
you can achieve it using java with minimal code. Refer http://stackoverflow.com/questions/13429119/get-unique-values-from-arraylist-in-java


No matter what you use to form the report, you'd still have to have a way to keep a tally of the distinct error messages that have come through. So your code may be part of the solution, but it does not solve the original question.

The original question is solved by keeping a tally either
- in a SHARED variable, with the risk that data is lost at restart
- in a file, with the added problem that you can't keep distinct values in a file
- in a database, which would neatly solve all problems, but for some reason is not to the OP's liking.

If you're going with the file option, then there's two possibilities:
- Consume the file each time a new error comes through, and write distinct values back to it. Additional problems: file locking, etc.
- Or, much simpler: just add the error to the file, and produce a tally on demand.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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