|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Getting MQ Property Group ID | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | MABeatty1978 | 
			  
				|  Posted: Wed Apr 01, 2015 5:24 am    Post subject: Getting MQ Property Group ID |   |  |  
		  | Acolyte
 
 
 Joined: 17 Jul 2014Posts: 54
 
 
 | 
			  
				| There has got to be a simple solution to this, but why can't I get a message group ID? 
 My code:
 
 
 
   
	| Code: |  
	| try{ queue.get(msg,gmo);
 System.out.println("Message Received");
 if (gmo.groupStatus == MQConstants.MQGS_NOT_IN_GROUP){
 System.out.println("Not in group");
 }
 else{
 System.out.println("Message in group");
 byte[] groupId = msg.getBytesProperty("groupId");
 }
 catch (MQException ex){
 System.out.println("Error occured.  CompCode: " + ex.completionCode + " Reason Code " + ex.reasonCode);
 }
 |  
 When running I get MQRC 2471 property not avail.
 
 I've gone through the MQ docs and as far as I can tell, eveything lines up.  "groupId" is the correct property name, its data type is byte[], MQMessage msg.getBytesProperty is the correct.
 
 What am I missing?
 |  |  
		  | Back to top |  |  
		  |  |  
		  | mqjeff | 
			  
				|  Posted: Wed Apr 01, 2015 5:32 am    Post subject: |   |  |  
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| group id is in the MQMD, not in a property. |  |  
		  | Back to top |  |  
		  |  |  
		  | MABeatty1978 | 
			  
				|  Posted: Wed Apr 01, 2015 5:39 am    Post subject: |   |  |  
		  | Acolyte
 
 
 Joined: 17 Jul 2014Posts: 54
 
 
 | 
			  
				| 
   
	| mqjeff wrote: |  
	| group id is in the MQMD, not in a property. |  
 I always figure the answer out on my own as soon as I post to this board.
 
 group id is a field in the MD and can be accessed directly
 
 byte[] myId = message.groupId
 
 .... such a simple solution.
 
 Thanks
 |  |  
		  | 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
 
 |  |  |  |