You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by demonair <de...@gmail.com> on 2009/06/22 19:41:38 UTC

Can not connect to another machine?

Hi all

I'm using ActiveMQ, to send and receive messages.

But now I want to connect to another machine to send and receive messages,
but not how to do it, I have to change to pass another ip?

for example:

private String url = "10.4.230.23";

and this is where IP sends and receives messages,
hope can help telling me where to send and receive change to that ip, or
send some manual which explains how. thanks

-- 
View this message in context: http://www.nabble.com/Can-not-connect-to-another-machine--tp24152072p24152072.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Can not connect to another machine?

Posted by demonair <de...@gmail.com>.


bsnyder wrote:
> 
> 
> The examples demonstrate the use of the broker URL to create a
> connection factory for a particular broker. The broker URL is noted in
> the activemq.xml configuration for the broker's transport connector
> configuration, specifically the uri attribute.
> 
> 


Sorry for don't understand
but since it is to connect to another machine you should just change the
path in the program as follows:

private String url = "tcp://101.101.101.101:61616";

thanks bruce.
-- 
View this message in context: http://www.nabble.com/Can-not-connect-to-another-machine--tp24152072p24154824.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Can not connect to another machine?

Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Jun 22, 2009 at 1:28 PM, demonair<de...@gmail.com> wrote:
>
>
> Yes I saw this examples, and I'm using the two separate so as to send and
> receive messages.
>
> but not send data to a queue that is in another machine

The examples demonstrate the use of the broker URL to create a
connection factory for a particular broker. The broker URL is noted in
the activemq.xml configuration for the broker's transport connector
configuration, specifically the uri attribute.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: Can not connect to another machine?

Posted by demonair <de...@gmail.com>.

Yes I saw this examples, and I'm using the two separate so as to send and
receive messages.

but not send data to a queue that is in another machine


-- 
View this message in context: http://www.nabble.com/Can-not-connect-to-another-machine--tp24152072p24153799.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Can not connect to another machine?

Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Jun 22, 2009 at 11:41 AM, demonair<de...@gmail.com> wrote:
>
> Hi all
>
> I'm using ActiveMQ, to send and receive messages.
>
> But now I want to connect to another machine to send and receive messages,
> but not how to do it, I have to change to pass another ip?
>
> for example:
>
> private String url = "10.4.230.23";
>
> and this is where IP sends and receives messages,
> hope can help telling me where to send and receive change to that ip, or
> send some manual which explains how. thanks

You need to specify the broker URL when creating the JMS connection.
See the examples in the example directory of the ActiveMQ
distribution, specifically the src directory for the ProducerTool.java
and the ConsumerTool.java. There's also some info here about running
the examples:

http://activemq.apache.org/examples.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder