Updated on 2022-11-18 GMT+08:00

Commissioning an Application in Windows

Starting Producer

  1. Ensure that the mappings between the host names and service IP addresses of all the hosts in the remote cluster are configured in the local hosts file.
  2. Run Producer.java on IntelliJ IDEA, as shown in Figure 1.

    Figure 1 Run Producer.java on IntelliJ IDEA

  3. The console window appears. You can find that Producer is sending messages to the default topic (example-metric1). One piece of log is printed when every 10 messages are sent.

    Figure 2 Proceducer running window

Starting Consumer

  1. Run the Consumer.java file.
  2. Click Run. In the console window that appears, you can find that Producer starts after Consumer successfully starts, and then you can view messages received in real time.

    Figure 3 Consumer.java running window

Starting Other Code Samples

The procedures for starting other code samples are similar to the procedures for starting Producer and Consumer in this section.