mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
				synced 2025-11-03 20:18:06 +00:00 
			
		
		
		
	Change logic to reset messages acked count on buffered producer
This commit is contained in:
		@@ -169,7 +169,6 @@ void BufferedProducer<BufferType>::flush() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
template <typename BufferType>
 | 
					template <typename BufferType>
 | 
				
			||||||
void BufferedProducer<BufferType>::wait_for_acks() {
 | 
					void BufferedProducer<BufferType>::wait_for_acks() {
 | 
				
			||||||
    messages_acked_ = 0;
 | 
					 | 
				
			||||||
    while (messages_acked_ < expected_acks_) {
 | 
					    while (messages_acked_ < expected_acks_) {
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
            producer_.flush();
 | 
					            producer_.flush();
 | 
				
			||||||
@@ -185,6 +184,7 @@ void BufferedProducer<BufferType>::wait_for_acks() {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    expected_acks_ = 0;
 | 
					    expected_acks_ = 0;
 | 
				
			||||||
 | 
					    messages_acked_ = 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template <typename BufferType>
 | 
					template <typename BufferType>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user