Files
spring-integration-extensions/spring-integration-etcd
Spring Operator 306eec5f5e URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 12 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 345 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-22 13:41:58 -04:00
..
2019-03-22 13:41:58 -04:00
2019-03-06 10:02:50 -05:00
2019-03-06 10:02:50 -05:00

SPRING INTEGRATION ETCD SUPPORT

ETCD LEADER ELECTION

If you need to elect a leader (e.g. for highly available message consumer where only one node should receive messages) you just need to create a LeaderInitiator. Example:

@Bean
public EtcdClient etcdClient() {
	return EtcdClient.forEndpoint("localhost",2379).withPlainText().build();
}

@Bean
public LeaderInitiator initiator() {
	LeaderInitiator initiator = new LeaderInitiator(etcdClient());
	return initiator;
}

Then when a node is elected leader it will send OnGrantedEvent to all application listeners. See the Spring Integration User Guide for more information on how to use those events to control messaging endpoints.