| Author | 
		  Message
		 | 
		
		  | byronlilu | 
		  
		    
			  
				 Posted: Sun Mar 25, 2007 5:49 pm    Post subject: help:how to get a copy of all message in a queue? | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 22 Mar 2007 Posts: 2
  
  | 
		  
		    
			  
				my problem is :
 
there is a on-line system using mqseries. to avoid doing some harm to 
 
the original system, my customer forbid us modifying the sender and the 
 
receiver.we want to program a new java program, which get a copy of all 
 
message in that queue.
 
anybody can give me a suggestion? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Sun Mar 25, 2007 6:01 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				You can't do this in pure Java, without modifying all the sender applications.
 
 
You can use the mirrorq sample exit to copy all the messages to another queue.
 
 
But that's written in C, not Java. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Mon Mar 26, 2007 3:14 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				
   
	| jefflowrey wrote: | 
   
  
	You can't do this in pure Java, without modifying all the sender applications.
 
 
You can use the mirrorq sample exit to copy all the messages to another queue.
 
 
But that's written in C, not Java. | 
   
 
 
 
You could alternatively write your own JMS publish application... however this implies that your recipient can deal with an RFH header...:
 
 
Redirect the target queue of sending app.
 
Subscribe the old recipient durably on it's old queue.
 
Subscribe the new recipient...
 
Publish the messages using your own JMS publish app... _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | byronlilu | 
		  
		    
			  
				 Posted: Mon Mar 26, 2007 6:02 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 22 Mar 2007 Posts: 2
  
  | 
		  
		    
			  
				thank you for replys!
 
 
I will try this way! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Mar 27, 2007 3:48 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Without using pub/sub, you could write a simple JMS program that would put messages to two destinations, and intercept the normal message flow in the same way. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |