We are currently experiencing challenges while implementing the Blue/Green deployment strategy for our services.
Our service architecture consists of several micro-services and a Kafka queue, with external producers and consumers. The decision to adopt the Blue/Green strategy was made in order to seamlessly handle any breaking changes that may occur. However, we have encountered an obstacle.
The issue arises when utilizing the traffic manager to connect to our Kafka service. Currently, consumers are successfully connecting to Kafka using the traffic manager URL. When we attempt to switch to the new cluster, we simply need to modify the traffic manager settings, resulting in an updated URL for the Kafka server.
Unfortunately, despite this URL update, the consumers continue to consume data from the old cluster. We are seeking guidance on how to enforce the consumers to begin consuming data from the new cluster.
Are there any settings that can help us here?
TIA.
I don't quite understand what "traffic manager" means here since that's not part of the Kafka protocol, but
advertised.listenersto clients, despite you telling them to use "traffic manager" to bootstrap. This means clients will have direct knowledge of the (original) brokers after they are connected.metadata.max.age.msto find new brokers and partitions, however this assumes the same cluster.Sounds like you need to stop/close the consumers, and reconnect through your "traffic manager" so that a new set of bootstrap servers would be returned.
In general, I've found Kafka consumers don't work in a blue-green environment because of shared consumer groups and both sides will be consuming data, potentially with different processing logic.