Author |
Message
|
abd.wsu |
Posted: Mon Aug 29, 2016 12:35 pm Post subject: getRuntimeProperty to get HTTP node properties in flows |
|
|
Acolyte
Joined: 12 Sep 2012 Posts: 65
|
Hello,
I am writing an API to display the http node proeprties for the various flows (about 250) on my broker. I am currently doing the same for the UDPs on the flows by using the getUserDefineProperty and getUserDefinedPropertyNames methods from the MessageFlowProxy.
I tried getting the http node properties using the getRuntimeProperty and getRuntimePropertyNames but nothing's being displayed. Is there a different set of proxy or methods i can use to get the HtTTPRequest/Reply node properties like URL,Protocol etc. |
|
Back to top |
|
 |
timber |
Posted: Tue Aug 30, 2016 12:38 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
I am writing an API to display the http node proeprties for the various flows (about 250) on my broker. |
What business problem are you trying to solve by doing this? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 30, 2016 3:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Displayed where? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
abd.wsu |
Posted: Tue Aug 30, 2016 5:22 am Post subject: |
|
|
Acolyte
Joined: 12 Sep 2012 Posts: 65
|
@timber, for UDPs i am changing the email ids in the AlertEmailList to send exception emails. For Http properties, i want to see what all protocols the http nodes in the 250 flows are using and if possible change them all to TLS during runtime. Changing and redeploying all these could be disruptive to the business.
@mqjeff, i am running this java code off of MB TK. So, i want this displayed on the java console in the TK. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 30, 2016 5:29 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
all of the properties you are looking for should be able to be displayed using mqsireportproperties... or whatever the thingy is with IIB v9/10.
There's also a java api for getting at this same kind of information.
If you want *anything* displayed in the toolkit, you probably need to write an Eclipse plugin.
The webadmin console for v9/10 may also let you find the information you are looking for. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
abd.wsu |
Posted: Tue Aug 30, 2016 5:40 am Post subject: |
|
|
Acolyte
Joined: 12 Sep 2012 Posts: 65
|
@mqjeff, mqsireportproperties works, bit i am trying to do this from the API. Is there any documentation as to what API/Proxy or method i can use to do this. I tried getUserDefinedProperties, getUserDefinedPropertyNames, getRuntimeProperties and getRuntimePropertyNames but that didn't work.
I can script something combining mqsireportproperties and mqsiapplybaroverrides to make the protocol changes, but i will have to redeploy the bar files for the changes to pickup. Is that assumption wrong? I am also assuming, like the email ids, i can make this changes in runtime with an API. |
|
Back to top |
|
 |
timber |
Posted: Tue Aug 30, 2016 5:43 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
Changing and redeploying all these could be disruptive to the business |
Not being able to quickly reproduce your production environment could also be disruptive to the business.
You should be able to use mqsiapplybaroverride to tweak your BAR files, and then redeploy them one by one. Then you can archive the BAR files and the BAR file property overrides in your version control system in case you need to recreate everything in a hurry. If you plan it carefully it should be possible to minimise or even completely avoid any downtime. |
|
Back to top |
|
 |
abd.wsu |
Posted: Tue Aug 30, 2016 6:13 am Post subject: |
|
|
Acolyte
Joined: 12 Sep 2012 Posts: 65
|
@timber, I can do it flow by flow, apply baroverrides in a planned manner without any impact and also update the version control system like you suggested.
I am just looking at other options and see what other possibilities are there.
Just trying to see if the API can be used for this. |
|
Back to top |
|
 |
Craig B |
Posted: Mon Sep 19, 2016 10:16 pm Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
The getRuntimePropertyNames() and getUserDefinedPropertyNames() MessageFlowProxy methods will only return MessageFlow level properties. MessageFlowProxy also has a getNodes() method which returns an Enumeration<MessageFlowProxy.Node>. On a MessageFlowProxy.Node you can call getType() and getProperties() to see the node level properties. Using this you should be able to HTTPRequest/HTTPReply nodes and validate the properties are as you expect in your deployment.
However, there is no setPropertye()/setProperties() methods. WMB/IIB does not support the updating of node properties post deployment. The closest there is for this is
a) When a node supports a policy such as an MQEndpoint policy, then the MQEndpoint can be updated.
b) When a node has monitoring events defined on the node this can be enabled/disabled at the node level.
c) A node uses a configurable service and the configurable service can be updated post deployment.
Unfortunately HTTP nodes have no such policy or configurable services that could be used.
If you do have properties on your nodes that you think need to be updated then updating live on the deployed flow has its drawbacks even if IIB had the mechanism to do this. If you only update the live system then your change would be wiped out the next time you redeploy. The better approach here is to use the API to detect you have settings deployed that need to be changed (that is better than parsing report properties output) and then use that to drive development artefact or BAR file updates that are used on a redeploy. That way the artefacts are as they should be for any future deploy and/or when you need to rebuild your systems etc _________________ Regards
Craig |
|
Back to top |
|
 |
|