You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by penny_hu <pe...@126.com> on 2006/11/13 04:04:19 UTC

Qustion about "Broker"!

who could introduce "Broker" for me please? when should i need it?

in the "ProducerAndConsumerTool" example, there is no "Broker"! is it means
that "Broker" is not a requisite for commucation with jms ?
-- 
View this message in context: http://www.nabble.com/Qustion-about-%22Broker%22%21-tf2619683.html#a7310781
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Qustion about "Broker"!

Posted by penny_hu <pe...@126.com>.
There is another question! I start the borker like this: 

        BrokerService broker = new BrokerService(); 
        broker.setUseJmx(true); 
        broker.addConnector("tcp://localhost:61616"); 
        broker.start(); 

and then I change the url of "ProducerAndConsumerTool" example to
"tcp://localhost:61616" too! it blocks at 
"consumer = session.createConsumer(destination)"! there is not any available
exception information. what is problem?
-- 
View this message in context: http://www.nabble.com/Qustion-about-%22Broker%22%21-tf2619683.html#a7329587
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Qustion about "Broker"!

Posted by Valerie Lavilla <Va...@simulalabs.com>.
 It appears the ProducerAndConsumerTool  uses an embedded broker by using 
"url=vm://localhost"  if no broker url is provided as its argument.  The 
broker is still required but in this case it's using an embedded broker so 
you don't have to start broker seperately.

You can checkout 
http://incubator.apache.org/activemq/how-do-i-embed-a-broker-inside-a-connection.html 
and http://www.activemq.org/site/vm-transport-reference.html for more info 
on embeded brokers.

Regards,
Val

----- Original Message ----- 
From: "penny_hu" <pe...@126.com>
To: <ac...@geronimo.apache.org>
Sent: Monday, November 13, 2006 3:19 PM
Subject: Re: Qustion about "Broker"!


>
> in the "ProducerAndConsumerTool" example, there is no "Broker"!  Besides 
> the
> "ProducerAndConsumerTool" example does performs very well , when the
> "Broker" example does not run.
> is it means that "Broker" is not a requisite for commucation with jms ? or
> is it because of "url=vm://localhost" in "ProducerAndConsumerTool" ?
>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Qustion-about-%22Broker%22%21-tf2619683.html#a7312469
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
> 


Re: Qustion about "Broker"!

Posted by penny_hu <pe...@126.com>.
in the "ProducerAndConsumerTool" example, there is no "Broker"!  Besides the
"ProducerAndConsumerTool" example does performs very well , when the
"Broker" example does not run.
is it means that "Broker" is not a requisite for commucation with jms ? or 
is it because of "url=vm://localhost" in "ProducerAndConsumerTool" ? 


-- 
View this message in context: http://www.nabble.com/Qustion-about-%22Broker%22%21-tf2619683.html#a7312469
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Qustion about "Broker"!

Posted by James Strachan <ja...@gmail.com>.
On 11/14/06, penny_hu <pe...@126.com> wrote:
>
> I have solved the problem , thank you for your help!


What was it?



-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Qustion about "Broker"!

Posted by penny_hu <pe...@126.com>.
I have solved the problem , thank you for your help!
-- 
View this message in context: http://www.nabble.com/Qustion-about-%22Broker%22%21-tf2619683.html#a7333106
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Qustion about "Broker"!

Posted by Valerie Lavilla <Va...@simulalabs.com>.
----- Original Message ----- 
From: "penny_hu" <pe...@126.com>
To: <ac...@geronimo.apache.org>
Sent: Monday, November 13, 2006 11:04 AM
Subject: Qustion about "Broker"!


>
> who could introduce "Broker" for me please? when should i need it?

JMS broker is basically a JMS server. It's a physical component that handles 
the communication between clients. Instead of communicating with each other, 
clients communicate only with the message broker. A client sends a message 
to the message broker, providing the logical name of the receivers. The 
message broker looks up client registered under the logical name and then 
passes the message to them.

>
> in the "ProducerAndConsumerTool" example, there is no "Broker"! is it 
> means
> that "Broker" is not a requisite for commucation with jms ?

In the producer/consumer example, you must run the broker first (that is by 
running activemq) before  running the producer and consumer.

You can read more about JMS here: http://java.sun.com/products/jms/tutorial/

HTH,
Val

> -- 
> View this message in context: 
> http://www.nabble.com/Qustion-about-%22Broker%22%21-tf2619683.html#a7310781
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>