Re: Re: how is topic implemented?

2017-08-09 Thread wangqinghuan
   I just want to learn some internal design about ActiveMQ.  I have just 
visited activemq site and surprisingly find the logo of activeMQ changes. Ha , 
the new logo is more colorful.


1095193...@qq.com
 
From: Tim Bain [via ActiveMQ]
Date: 2017-08-09 12:37
To: wangqinghuan
Subject: Re: Re: how is topic implemented?
It doesn't use temporary queues. Rather, each consumer results in a 
TopicSubscription 
<https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java>
 
being created, and each message sent to the topic has a reference handed to 
the TopicSubscription for processing. This uses memory, but is 
lighter-weight than using a full-fledged destination such as a temporary 
queue. 

Why do you ask? 

Tim 

On Tue, Aug 8, 2017 at 8:02 PM, wangqinghuan <[hidden email]> wrote: 

> hi Justin 
> 
>  I'm using ActiveMQ 5.9 broker. 
> 
> 
> 
> [hidden email] 
> 
> From: Justin Bertram [via ActiveMQ] 
> Date: 2017-08-08 21:02 
> To: wangqinghuan 
> Subject: Re: how is topic implemented? 
> Are you talking about the ActiveMQ 5.x broker or ActiveMQ Artemis broker? 
> 
> 
> Justin 
> 
> On Tue, Aug 8, 2017 at 3:06 AM, wangqinghuan <[hidden email]> wrote: 
> 
> > Hi 
> > I have some puzzle about implementation of topic. 
> > When many subsribers subscribe a topic, they each one can receive a copy 
> of 
> > message. How does activeMq implement topic? Does it maintain a temporary 
> > queue for every subscriber? If lots of subsribers, lots of queues  are 
> > maintained in ActiveMQ broker? 
> > 
> > 
> > 
> > -- 
> > View this message in context: http://activemq.2283324.n4. 
> > nabble.com/how-is-topic-implemented-tp4729456.html 
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com. 
> > 
> 
> 
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below: 
> http://activemq.2283324.n4.nabble.com/how-is-topic-
> implemented-tp4729456p4729460.html 
> To unsubscribe from how is topic implemented?, click here. 
> NAML 
> 
> 
> 
> 
> -- 
> View this message in context: http://activemq.2283324.n4. 
> nabble.com/how-is-topic-implemented-tp4729456p4729511.html 
> Sent from the ActiveMQ - User mailing list archive at Nabble.com. 
> 




If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/how-is-topic-implemented-tp4729456p4729514.html
 
To unsubscribe from how is topic implemented?, click here.
NAML 




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/how-is-topic-implemented-tp4729456p4729525.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Re: how is topic implemented?

2017-08-08 Thread Tim Bain
It doesn't use temporary queues. Rather, each consumer results in a
TopicSubscription
<https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java>
being created, and each message sent to the topic has a reference handed to
the TopicSubscription for processing. This uses memory, but is
lighter-weight than using a full-fledged destination such as a temporary
queue.

Why do you ask?

Tim

On Tue, Aug 8, 2017 at 8:02 PM, wangqinghuan <1095193...@qq.com> wrote:

> hi Justin
>
>  I'm using ActiveMQ 5.9 broker.
>
>
>
> 1095193...@qq.com
>
> From: Justin Bertram [via ActiveMQ]
> Date: 2017-08-08 21:02
> To: wangqinghuan
> Subject: Re: how is topic implemented?
> Are you talking about the ActiveMQ 5.x broker or ActiveMQ Artemis broker?
>
>
> Justin
>
> On Tue, Aug 8, 2017 at 3:06 AM, wangqinghuan <[hidden email]> wrote:
>
> > Hi
> > I have some puzzle about implementation of topic.
> > When many subsribers subscribe a topic, they each one can receive a copy
> of
> > message. How does activeMq implement topic? Does it maintain a temporary
> > queue for every subscriber? If lots of subsribers, lots of queues  are
> > maintained in ActiveMQ broker?
> >
> >
> >
> > --
> > View this message in context: http://activemq.2283324.n4.
> > nabble.com/how-is-topic-implemented-tp4729456.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
>
>
>
> If you reply to this email, your message will be added to the discussion
> below:
> http://activemq.2283324.n4.nabble.com/how-is-topic-
> implemented-tp4729456p4729460.html
> To unsubscribe from how is topic implemented?, click here.
> NAML
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/how-is-topic-implemented-tp4729456p4729511.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Re: how is topic implemented?

2017-08-08 Thread wangqinghuan
hi Justin
  
 I'm using ActiveMQ 5.9 broker. 



1095193...@qq.com
 
From: Justin Bertram [via ActiveMQ]
Date: 2017-08-08 21:02
To: wangqinghuan
Subject: Re: how is topic implemented?
Are you talking about the ActiveMQ 5.x broker or ActiveMQ Artemis broker? 


Justin 

On Tue, Aug 8, 2017 at 3:06 AM, wangqinghuan <[hidden email]> wrote: 

> Hi 
> I have some puzzle about implementation of topic. 
> When many subsribers subscribe a topic, they each one can receive a copy of 
> message. How does activeMq implement topic? Does it maintain a temporary 
> queue for every subscriber? If lots of subsribers, lots of queues  are 
> maintained in ActiveMQ broker? 
> 
> 
> 
> -- 
> View this message in context: http://activemq.2283324.n4. 
> nabble.com/how-is-topic-implemented-tp4729456.html 
> Sent from the ActiveMQ - User mailing list archive at Nabble.com. 
> 




If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/how-is-topic-implemented-tp4729456p4729460.html
 
To unsubscribe from how is topic implemented?, click here.
NAML 




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/how-is-topic-implemented-tp4729456p4729511.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: how is topic implemented?

2017-08-08 Thread Justin Bertram
Are you talking about the ActiveMQ 5.x broker or ActiveMQ Artemis broker?


Justin

On Tue, Aug 8, 2017 at 3:06 AM, wangqinghuan <1095193...@qq.com> wrote:

> Hi
> I have some puzzle about implementation of topic.
> When many subsribers subscribe a topic, they each one can receive a copy of
> message. How does activeMq implement topic? Does it maintain a temporary
> queue for every subscriber? If lots of subsribers, lots of queues  are
> maintained in ActiveMQ broker?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/how-is-topic-implemented-tp4729456.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


how is topic implemented?

2017-08-08 Thread wangqinghuan
Hi 
I have some puzzle about implementation of topic.
When many subsribers subscribe a topic, they each one can receive a copy of
message. How does activeMq implement topic? Does it maintain a temporary
queue for every subscriber? If lots of subsribers, lots of queues  are
maintained in ActiveMQ broker?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/how-is-topic-implemented-tp4729456.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.