Getting started with Kafka-0.10.0.0, kafka0.10

Source: Internet
Author: User

Getting started with Kafka-0.10.0.0, kafka0.10

Build an environment (pseudo cluster is acceptable), but note that the configuration of Kafka must be configured, and the same can be used with less configuration, but can only be used on a single machine, external machines cannot be connected, it is also said on the Internet.

Host. name = 192.168.1.30

Advertised. host. name = 192.168.1.30

Interfaceshost. name = 192.168.1.30

0.10.0.0 and 0.9 should lack the log4j dependency and cannot directly use log4j TO kafka. You can rely on the kafka-log4j-appender to use this package, or flume collaboration

<Dependency>

<GroupId> org. apache. kafka </groupId>

<ArtifactId> kafka-log4j-appender </artifactId>

<Version> 0.10.0.0 </version>

</Dependency>

 

Client command:

Message recipient (all)

Kafka-console-consumer.sh -- zookeeper localhost: 2181 -- topic my-topic -- from-beginning

Producer

Bin/kafka-console-producer.sh -- broker-list localhost: 9092 -- topic my-topic

 

JAVA production and consumption (in the official example)

Production capital

Consumer

 

Summary: the service-oriented things can only be said: 1. Learning configuration; 2. Learning how to use and adding the required logic. It is usually black box. To change the underlying layer, you must first encounter a scenario. Easy to use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.