mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
				synced 2025-11-03 20:18:06 +00:00 
			
		
		
		
	Add compile guard for rd_kafka_event_stats
This commit is contained in:
		@@ -121,12 +121,16 @@ public:
 | 
			
		||||
     */
 | 
			
		||||
    void* get_opaque() const;
 | 
			
		||||
 | 
			
		||||
#if RD_KAFKA_VERSION >= RD_KAFKA_EVENT_STATS_SUPPORT_VERSION
 | 
			
		||||
    /**
 | 
			
		||||
     * \brief Gets the stats in this event
 | 
			
		||||
     *
 | 
			
		||||
     * This call is only valid if the event type is RD_KAFKA_EVENT_STATS
 | 
			
		||||
     */
 | 
			
		||||
    std::string get_stats() const;
 | 
			
		||||
    std::string get_stats() const {
 | 
			
		||||
        return rd_kafka_event_stats(handle_.get());
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * \brief Gets the topic/partition for this event
 | 
			
		||||
 
 | 
			
		||||
@@ -48,5 +48,6 @@
 | 
			
		||||
#define RD_KAFKA_HEADERS_SUPPORT_VERSION 0x000b0402 //v0.11.4.02
 | 
			
		||||
#define RD_KAFKA_ADMIN_API_SUPPORT_VERSION 0x000b0500 //v0.11.5.00
 | 
			
		||||
#define RD_KAFKA_MESSAGE_LATENCY_SUPPORT_VERSION 0x000b0000 //v0.11.0.00
 | 
			
		||||
#define RD_KAFKA_EVENT_STATS_SUPPORT_VERSION 0x000b0000 //v0.11.0.00
 | 
			
		||||
 | 
			
		||||
#endif // CPPKAFKA_MACROS_H
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user