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 » Changing values dynamically in WMB

Post new topic  Reply to topic
 Changing values dynamically in WMB « View previous topic :: View next topic » 
Author Message
GeneRK4
PostPosted: Wed Jan 29, 2014 6:06 pm    Post subject: Changing values dynamically in WMB Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

Hi experts,
Let me know which choice would be better...
I need to change some user defined variable called "RetryCount" dynamically without redeployment.
Initially I thought using UDP in which MBExplorer or CMP API help in changing the value dynamically.

But I want to change the value using mqsi command.
I got the below commands to create user defined configurable service.And then having the variable as a property as below.

"Add a property to a configurable service of type UserDefined:
mqsichangeproperties MB8BROKER -c UserDefined
-o MyService1 -n VerifyRequestTimeout -v 60"


Please let me know which choice would be better...Or is there any other way to achieve this?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Jan 29, 2014 11:54 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 value from a DB table and cache it in a shared variable. Periodically re-read the value every 'n' messages (or using some other metric)

We use a DB table to store all sorts of params for flows. When you change one, you just restart the flow and you are done.
It also solves the problem with diferent params (webservice endpoints) for different environments (Test, UAT, Pre-Prod and Prod).

As you can see there are many different solutions. You need to select the best one for your environment.
_________________
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
dogorsy
PostPosted: Thu Jan 30, 2014 2:58 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Please read "Setting message flow user-defined properties at run time in a CMP application" in the infocentre.
In my opinion it is far better than using a database, but if I remember well, when you restart the flow the property gets back to its original value, so you need to reset it ( or change the value in the flow and redeploy ).

If you are in a test environment where you cannot redeploy often, then I would recommend this approach, once in production you probably do not need to change the value for a long time, and if you do, then you change the MF property and redeploy.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Jan 30, 2014 3:34 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.

dogorsy wrote:
and if you do, then you change the MF property and redeploy.


In some places a message flow redeploy requires an act of Congress/Parliament whereas a DB value change is in the majority of cases a lot easier to get approved.
But as I said, every site/location is different.
_________________
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
dogorsy
PostPosted: Thu Jan 30, 2014 3:39 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

smdavies99 wrote:
dogorsy wrote:
and if you do, then you change the MF property and redeploy.


In some places a message flow redeploy requires an act of Congress/Parliament whereas a DB value change is in the majority of cases a lot easier to get approved.
But as I said, every site/location is different.


Yes, I agree, that is why I am just giving options, and then the OP needs to make a decision on what if best for his/her environment.
But as I said, in a production environment, the UDP is probably something that you do not change often ( if you ever do ).
Back to top
View user's profile Send private message
GeneRK4
PostPosted: Thu Jan 30, 2014 5:11 pm    Post subject: Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

smdavies99 wrote:
Read the value from a DB table and cache it in a shared variable. Periodically re-read the value every 'n' messages (or using some other metric)

We use a DB table to store all sorts of params for flows. When you change one, you just restart the flow and you are done.


Thanks for your response..
Please clarify me a query I have got in your response.
I take my parameter in DB table.And cache it in a shared variable.So,if there is any change the message creates in the shared variable,it will not be changed in the Database?
Rather,if I make a change directly in the Database,then without reployment,whether the shared variables picks up the data from the table?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Jan 30, 2014 10:18 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.

If you change the DB value then a FLOW restart is all that is needed. NO NEED FOR A RE-DEPLOY.

If you treat the values in the shared row as READ-ONLY then you don't have to think about updating the DB. If you want to change something on the fly copy it and use it from there. Then if you need to go back to the original you can.
_________________
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
dogorsy
PostPosted: Fri Jan 31, 2014 12:17 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

smdavies99 wrote:
If you change the DB value then a FLOW restart is all that is needed.

Or a cache refresh. As you mentioned earlier, this could be performed automatically at set periods. ( I had one customer where the cache was invalidated when the date changed, and then the first message of the day would reload the cache )
Back to top
View user's profile Send private message
protocol
PostPosted: Mon Feb 03, 2014 12:24 pm    Post subject: Reply with quote

Apprentice

Joined: 25 Feb 2005
Posts: 41

Personally, I would go with the UDP option. I dont have your complete requirements. Check this out also:

ftp://public.dhe.ibm.com/software/integration/support/supportpacs/individual/ia91.wbimb.pdf
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 » Changing values dynamically in WMB
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.