createMessageStreams is used for consuming from specific topic(s), where
you can put a map of [topic-name, num-threads] as its input parameters;

createMessageStreamsByFilter is used for consuming from wildcard topics,
where you can put a (regex, num-threads) as its input parameters, and for
each regex matched topic num-threads will be created.

The difference between these two are not really for throughput / latency,
but rather consumption semantics.

Guozhang


On Tue, Feb 10, 2015 at 3:02 AM, tao xiao <xiaotao...@gmail.com> wrote:

> Hi team,
>
> I am comparing the differences between
> ConsumerConnector.createMessageStreams
> and ConsumerConnector.createMessageStreamsByFilter. My understanding is
> that createMessageStreams creates x number of threads (x is the number of
> threads passed in to the method) dedicated to the specified topic
> while createMessageStreamsByFilter creates x number of threads shared by
> topics specified by TopicFilter. Is it correct?
>
> If this is the case I assume createMessageStreams is the preferred way to
> create streams for each topic if I have high throughput and low latency
> demands. is my assumption correct?
>
> --
> Regards,
> Tao
>



-- 
-- Guozhang

Reply via email to