title: Blue/Green deployment for service that using Kafka in docker swarm
body: <p><strong>Goal:</strong> is to organize blue/green deployment for the particular spring-boot service which is using Kafka.(I'm not interested how to solve B/G on REST or DB layer so lets assume that this part of B/G is already done on LB)</p>
  
  <p><strong>I want:</strong> to run two instances of service in docker swarm cluster simultaneously. But one of them must be in sleep mode i.e. do not produce and consume any messages.</p>
  
  <p><strong>Biggest problem:</strong> it is not a big deal to set scale = 2 for my service. However in this case each instance of service will consume events and process them. This leads to disaster. So I need simple and transparent mechanism for turning off all services' producers and consumers and restore them with specific offset</p>
  
  <p>I`m looking for an example or suggestions how to achieve that.</p>
  
  <p><strong>Current idea:</strong> is to store current offsets in zookeeper and write custom layer that will pool those configs and manage consumers and producers based on that. However, I believe some better and simpler way/framework exists.</p>