File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes JMS: Problem with Consumer Program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS: Problem with Consumer Program" Watch "JMS: Problem with Consumer Program" New topic
Author

JMS: Problem with Consumer Program

Nitin D Gaur
Greenhorn

Joined: Jul 04, 2008
Posts: 10


Hi Forum,

I am using one Producer-Consumer program on Apache ActiveMQ to send and recieve messages from remote JMS-Broker server. I am able to successfully produce the message but not able to consume the response from JMS-Broker Server. Below is my program.




I tested this code locally by using a local consumer-producer program this program works fine but for remote JMS-Broker Server it doesn't.

Please somebody help.

Thanks,
Nitin
Michael Rootman
Greenhorn

Joined: Apr 15, 2009
Posts: 19
Hi,

Do you get any error?
Did you check that port is opened on remote server?

Regards,
Nitin D Gaur
Greenhorn

Joined: Jul 04, 2008
Posts: 10
Yeah Ports are opened,

No error either.

Messages are enqueued in the queue, I could see it in ActiveMQ wed admin.

but I am not able to consume it.

Could this be the prefetch size problem ?
because there are multiple consumers for the queue. Currently prefetch size is 1000.
what should be the value for multiple consumers ?

ciao

Nitin
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JMS: Problem with Consumer Program
 
Similar Threads
ActiveMQ topic
JMS Consumer ends even after implementing MessageListener interface.
JMS: Problem with Consumer Program
threads
Same Code Different Behaviour