Santosh Kumar
Santosh Kumar

Reputation: 85

How to read Message from ActiveMQ Without JMS in Java

Machine 1 - has JMS and ActiveMQ is runnning.

Machine 2 - No JMS and ActiveMQ is not avialable/runnning.

Please let me know , how machine 2 reads the messages posted by machine 1 .

Upvotes: 0

Views: 1221

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 34988

Here's a couple of important starting points:

  • All message brokers that I know of (including ActiveMQ) follow a client/server model where a server process runs on a particular machine and a client process accesses that server over the network. This is the same model followed by, for example, web servers and HTML browsers.
  • JMS is an API. It doesn't run. It can be used on a client or a server or both.

In your scenario you just need to put the ActiveMQ client libraries and your client application (which will use those libraries via the JMS API) on Machine 2. The client simply needs the hostname and port information for Machine 1 where the server is running in order to connect to it. This assumes, of course, that the server on Machine 1 is configured to be available over the network.

A simple "Hello World" example is available on the ActiveMQ website.

Upvotes: 3

Related Questions