| Author | 
		  Message
		 | 
		
		  | NotMe | 
		  
		    
			  
				 Posted: Wed Dec 23, 2009 7:41 am    Post subject: Doing something wrong with amqspub/amqssub | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 25 Nov 2009 Posts: 26
  
  | 
		  
		    
			  
				I'm using MQ 7.0 on linux with the below configuration...
 
 
DEFINE TOPIC('FOOD') +
 
        TOPICSTR('FOOD/') +
 
        REPLACE
 
 
DEFINE TOPIC('MEAT') +
 
        TOPICSTR('FOOD/MEAT/') +
 
        REPLACE
 
 
DEFINE QL('FOOD') +
 
        REPLACE
 
 
DEFINE QL('MEAT') +
 
        REPLACE
 
 
 
DEFINE SUB('FOOD') +
 
        DEST('FOOD') +
 
        TOPICSTR('FOOD/') +
 
        REPLACE
 
 
 
DEFINE SUB('MEAT') +
 
        DEST('MEAT') +
 
        TOPICSTR('FOOD/MEAT/') +
 
        REPLACE
 
 
then I run /opt/mqm/samp/bin/amqspub...
 
 
./amqspub FOOD/MEAT/ QM1
 
Sample AMQSPUBA start
 
target topic is FOOD/MEAT/
 
TEST#20
 
TEST#21
 
TEST#22
 
 
Sample AMQSPUBA end
 
 
 
but when I run /opt/mqm/samp/bin/amqssub I get no data back.  Is it something I am missing?  What could I be doing wrong?
 
 
./amqssub FOOD/MEAT/ QM1
 
Sample AMQSSUBA start
 
Calling MQGET : 30 seconds wait time
 
no more messages
 
Sample AMQSSUBA end | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | NotMe | 
		  
		    
			  
				 Posted: Wed Dec 23, 2009 9:58 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 25 Nov 2009 Posts: 26
  
  | 
		  
		    
			  
				| Anyone, Anyone, Anyone, Bueller, Bueller, Bueller... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvic | 
		  
		    
			  
				 Posted: Wed Dec 23, 2009 5:56 pm    Post subject: Re: Doing something wrong with amqspub/amqssub | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 09 Mar 2004 Posts: 2080
  
  | 
		  
		    
			  
				
   
	| NotMe wrote: | 
   
  
	| but when I run /opt/mqm/samp/bin/amqssub I get no data back.  Is it something I am missing?  What could I be doing wrong? | 
   
 
 
Publish gives a message to any subscribed subscribers.
 
 
The way you described this, it looks like your subscriber starts as a non-durable subscriber after the publish was done.
 
 
The publish therefore was done when this subscriber was not subscribed.
 
 
Result: the queue manager did not know about this subscriber at the time of the publish so could not deliver a message to it.
 
 
I don't know what opinions others hold on this, but this question is not related to WMB so should probably be moved to a different forum. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Wed Dec 23, 2009 6:16 pm    Post subject: Re: Doing something wrong with amqspub/amqssub | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| mvic wrote: | 
   
  
	| I don't know what opinions others hold on this, but this question is not related to WMB so should probably be moved to a different forum. | 
   
 
 
 
  _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | manicminer | 
		  
		    
			  
				 Posted: Thu Dec 24, 2009 1:14 am    Post subject: Re: Doing something wrong with amqspub/amqssub | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 11 Jul 2007 Posts: 177
  
  | 
		  
		    
			  
				
   
	| Vitor wrote: | 
   
  
	
   
	| mvic wrote: | 
   
  
	| I don't know what opinions others hold on this, but this question is not related to WMB so should probably be moved to a different forum. | 
   
 
 
 
  | 
   
 
 
 
I agree 3  
 
 
Run your subscriber in a separate window. Then as you put you will see the messages arrive. _________________ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | nathanw | 
		  
		    
			  
				 Posted: Thu Dec 24, 2009 1:23 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 14 Jul 2004 Posts: 550
  
  | 
		  
		    
			  
				try doing the sample exercises like the soccer application this will help in the understanding of what is required and where _________________ Who is General Failure and why is he reading my hard drive?
 
 
Artificial Intelligence stands no chance against Natural Stupidity.
 
 
Only the User Trace Speaks The Truth   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | NotMe | 
		  
		    
			  
				 Posted: Thu Dec 24, 2009 5:25 am    Post subject: Re: Doing something wrong with amqspub/amqssub | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 25 Nov 2009 Posts: 26
  
  | 
		  
		    
			  
				
   
	| manicminer wrote: | 
   
  
	
 
Run your subscriber in a separate window. Then as you put you will see the messages arrive. | 
   
 
 
 
Thanks. I ran the subscriber in a separate window and it worked... | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |