Springcloud Configuring dynamic Updates

Source: Internet
Author: User
Tags zookeeper rabbitmq webhook

After implementing the Springcloud Configuration Center, we need to consider the dynamic refresh configuration. If there is only one client to consider, we can add webhook when the configuration file has a push operation and use Webhook to send a refreshed POST request to the client. But when the client is in a lot of situations, it is impractical to request multiple clients. So we thought of just refreshing the configuration center directly by the configuration center to notify each client to get the latest configuration. Here's a note of the day today. Using Springcloud Bus Integration Kafka (or RABBITMQ) to achieve dynamic refresh, local play, so is the Windows environment Ha, Linux is similar. Because the project before the use of Kafka, the new project launches directly to use, so there is no use of RABBITMQ, want to use RABBITMQ classmate can be a separate Baidu ha.

First, because the Kafka strong dependence on zookeeper, so we have to install zookeeper and Kafka

1. Installing zookeeper

Download the compressed package https://www.apache.org/dyn/closer.cgi/zookeeper and unzip to D drive, I downloaded the latest stable version zookeeper-3.4.12.tar.gz

Modify environment variable, add variable zookeeper_home variable value D:\zookeeper-3.4.12 modify variable Path variable value add%zookeeper_home%\bin;

Create a new folder under D:\zookeeper-3.4.12 data and log, and then copy the zoo_sample.cfg under D:\zookeeper-3.4.12\conf to the current directory named Zoo.cfg and add

Datadir=d:/zookeeper-3.4.12/data
Datalogdir=d:/zookeeper-3.4.12/log

Open the CMD window as an administrator, enter Zkserver, or start the ZK service

2. Installing Kafka

Download the compressed package http://kafka.apache.org/downloads any binary files and unzip to the D drive, I downloaded the kafka_2.12-1.1.0.

  

  

  

 

  

Springcloud Configuring dynamic Updates

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.