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 » File Nodes : Need some pointers

Post new topic  Reply to topic Goto page 1, 2  Next
 File Nodes : Need some pointers « View previous topic :: View next topic » 
Author Message
Abhinay185127
PostPosted: Mon Jul 08, 2013 8:38 pm    Post subject: File Nodes : Need some pointers Reply with quote

Acolyte

Joined: 20 May 2013
Posts: 58

Hi,

There is a requirement where we need to archive our messages in a file. Now the messages have to be archived in the same file(append) till the size reahes a particular limit (say 10 MB). After that a new file needs to be created which would be following similar pattern. Can anyone tell me how to achieve this if someone has worked on this.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Jul 08, 2013 10:21 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Easy enough - just keep appending the message data to the same file and keep a count of the cumulative amount of data (e.g. in an external variable).

When you reach the limit finalize the file after that message. The next one can start a new file (set a new name obviously).
Back to top
View user's profile Send private message
Abhinay185127
PostPosted: Mon Jul 08, 2013 10:36 pm    Post subject: Reply with quote

Acolyte

Joined: 20 May 2013
Posts: 58

Quote:
Easy enough - just keep appending the message data to the same file and keep a count of the cumulative amount of data (e.g. in an external variable).

When you reach the limit finalize the file after that message. The next one can start a new file (set a new name obviously).

Basically we will be getting a message every 5 mins. Now second time when the message comes (say we have kept the count of the data in an external variable) we have to compare the cumulative data size with the 10 MB size. So the external variable will work or do we need to use global cache for storing the size information.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Jul 08, 2013 10:39 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Why would I give you a solution that does not work?

Perhaps read the infocenter.
Back to top
View user's profile Send private message
Abhinay185127
PostPosted: Mon Jul 08, 2013 10:41 pm    Post subject: Reply with quote

Acolyte

Joined: 20 May 2013
Posts: 58

Actually have not worked with external variable so don't know the functionality.

Will read about it.

Thanks for the help.
Back to top
View user's profile Send private message
Abhinay185127
PostPosted: Mon Jul 08, 2013 10:43 pm    Post subject: Reply with quote

Acolyte

Joined: 20 May 2013
Posts: 58

Actually have not worked with external variable so don't know the functionality.

Will read about it.

Thanks for the help.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Jul 08, 2013 10:57 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You will also need to consider what happens if you want to stop the the EG or broker before when a partial file has been written.

The value in the external variable will not survive a broker, or EG restart.
Back to top
View user's profile Send private message
Abhinay185127
PostPosted: Mon Jul 08, 2013 11:09 pm    Post subject: Reply with quote

Acolyte

Joined: 20 May 2013
Posts: 58

Quote:
You will also need to consider what happens if you want to stop the the EG or broker before when a partial file has been written.

The value in the external variable will not survive a broker, or EG restart.


External variable we will be setting as a UDP. So in this case we will define this external variable at the flow level by calculating the size of input message and storing it.
So once the flow terminates and we get a new request does this means that the value(size) that we store in external variable will still be there because we have to compare the size.
I am asking this because we are defining it at flow level so after the flow successfully terminates the scope of the external variable should end.

Kindly correct my understanding if wrong.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jul 08, 2013 11:25 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.

How does defining it as a UDP cover a
- a redeploy of the flow (i.e. a new version)
- a broker restart
- failing the broker over to another node (if in an HACMP environment)

You really need to hold the accumulated file size in a table.

IMHO, Archiving messages to files like this is a seriously 'old-school' habit. There are far better ways these days.

I'd go back to the person who gave you the requirement and ask them the following:-
What sort of file maintenance and archiving are you putting in place?
What happens when the target disk becomes full?

Dare I say it, perhaps the requirement is wrong in the first place?
_________________
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
Abhinay185127
PostPosted: Mon Jul 08, 2013 11:42 pm    Post subject: Reply with quote

Acolyte

Joined: 20 May 2013
Posts: 58

But since the requirement is such and we already suggested the record and replay mechanism for archiving but the clients want to go with the file archiving only.

Quote:
How does defining it as a UDP cover a
- a redeploy of the flow (i.e. a new version)
- a broker restart
- failing the broker over to another node (if in an HACMP environment)


So in that case external variable won't work. Can we use shared variable for achieving this scenario or should we go for global cache.

Once we have archived the files they will be deleted after 7 days based on the timestamp. So the disk should not be full as the traffic coming is not much.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Jul 09, 2013 12:20 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.

A shared variable won't survive a broker restart.

Unless you are already using a Global Cache setup then I'd go for storing the data in a table.
_________________
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
lancelotlinc
PostPosted: Tue Jul 09, 2013 3:11 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Abhinay185127 wrote:
should we go for global cache.


Before you go for anything else, you should go for training.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Abhinay185127
PostPosted: Tue Jul 09, 2013 8:14 pm    Post subject: Reply with quote

Acolyte

Joined: 20 May 2013
Posts: 58

Quote:
Unless you are already using a Global Cache setup then I'd go for storing the data in a table.


I tried using the global cache but even global cache couldn't survive a broker restart.
So this means to achieve the scenario using a database is the only possibility.
Kindly guide.
Back to top
View user's profile Send private message
Abhinay185127
PostPosted: Tue Jul 09, 2013 8:15 pm    Post subject: Reply with quote

Acolyte

Joined: 20 May 2013
Posts: 58

@lancelotlinc

Yes sure i'll be going for a training to learn the wider aspects of WMB.
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Jul 09, 2013 11:48 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You could also put it into a message on a queue. I know a queue is not a database, but a single message does no harm and it can be a lot easier to arrange than getting a new database table set up.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » File Nodes : Need some pointers
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.