Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jafka#start(Properties, Properties, Properties) 方法判断有误 #51

Open
ykgarfield opened this issue Sep 19, 2016 · 1 comment
Open

Comments

@ykgarfield
Copy link

此方法如下:

public void start(Properties mainProperties, Properties consumerProperties, Properties producerProperties) {
        final ServerConfig config = new ServerConfig(mainProperties);
        final ConsumerConfig consumerConfig = consumerProperties == null ? null : new ConsumerConfig(consumerProperties);
        final ProducerConfig producerConfig = consumerConfig == null ? null : new ProducerConfig(producerProperties);
        start(config, consumerConfig, producerConfig);
}

ProducerConfig producerConfig ... 这行代码判断是否有误,应该是:

final ProducerConfig producerConfig = producerProperties == null ? null : new ProducerConfig(producerProperties);

是否应该是判断 producerProperties == null 而不是 consumerConfig == null.

@adyliu
Copy link
Owner

adyliu commented Sep 19, 2016

没问题。

这段代码的意思是 如果需要消费消息,那么消费的消息需要重新以Producer的方式发送出去。
其实是镜像拷贝功能。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants