|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| WMQI Broker Name | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | DaveBoynton | 
			  
				|  Posted: Wed Jun 18, 2003 7:37 am    Post subject: WMQI Broker Name |   |  |  
		  | Newbie
 
 
 Joined: 18 Jun 2003Posts: 1
 Location: London
 
 | 
			  
				| Hi, Does anyone know if there's a way that a message flow can derive the name of the broker it's running under? We have 4 boxes running in an MQ cluster, and the flows log entries to a single Oracle database. We need to log which broker/box the message has passed through.
 
 I am told that the IA06 (get environment variables) plug in is no longer supported on Solaris, and this would have been one way of getting the information. We can't hard-code a value, as the code must be unchanged when promoting between environments.
 
 Cheers,
 Dave.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | Craig B | 
			  
				|  Posted: Wed Jun 18, 2003 9:12 am    Post subject: |   |  |  
		  | Partisan
 
 
 Joined: 18 Jun 2003Posts: 316
 Location: UK
 
 | 
			  
				| Hi, 
 As far as I am aware, there are no "built-in" functions available to a message flow to retrieve such things as broker name, execution group name or queue manager name etc. The Plugin Programming interface has a cniGetBrokerInfo method which can retrieve such information as the broker name and message flow name etc. Therefore one option is to write a plugin node to do this retrieve these details and populate them into your output message.
 _________________
 Regards
 Craig
 |  |  
		  | Back to top |  |  
		  |  |  
		  | philip.baker | 
			  
				|  Posted: Wed Jun 18, 2003 2:56 pm    Post subject: |   |  |  
		  |  Voyager
 
 
 Joined: 21 Mar 2002Posts: 77
 Location: Baker Systems Consulting, Inc. - Tampa
 
 | 
			  
				| Dave, 
 One way I have done this in the past is to store the info in a database table on the Broker server. The message flow would query the data and use the returned data however is needed. The message flow does not have to be changed when migrating from one environment to another(accessing one database or another), it simply queries different data in whatever database it now attaches to. (There is an assumption that the database connect string (DSN/ODBC connection) is the same for the different Broker servers so the flow does not need to be changed for the database connection.)
 _________________
 Regards,
 Phil
 |  |  
		  | Back to top |  |  
		  |  |  
		  | Ian | 
			  
				|  Posted: Thu Jun 19, 2003 2:18 am    Post subject: |   |  |  
		  | Disciple
 
 
 Joined: 22 Nov 2002Posts: 152
 Location: London, UK
 
 | 
			  
				| Hi, 
 There are no WMQI functions to get the broker name.
 
 To get the broker name you would need to write a plugin node.
 
 C plugin :
 
 Read the WMQIv2.1 Programming Guide manual.
 
 cniGetBrokerInfo queries the current broker environment (for example, for information about broker
 name and message flow name). The information is returned in a structure of type CNI_BROKER_INFO_ST.
 
 Java plugin :
 
 The following method returns the name of the broker :
 
 getBroker().getName();
 
 This is discussed in the following thread :
 http://www.mqseries.net/phpBB/viewtopic.php?t=8349&highlight=broker+name
 
 The Java Plugin node API is installed as part of the product.
 For example : C:\Program Files\IBM\WebSphere MQ Integrator 2.1\docs\JavaAPI\index.html
 _________________
 Regards, Ian
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | 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
 
 |  |  |  |