@@ -33,8 +33,7 @@ namespace NodeKafka {
3333Producer::Producer (Conf* gconfig, Conf* tconfig):
3434 Connection (gconfig, tconfig),
3535 m_dr_cb (),
36- m_partitioner_cb (),
37- m_is_background_polling (false ) {
36+ m_partitioner_cb () {
3837 std::string errstr;
3938
4039 if (m_tconfig)
@@ -345,30 +344,6 @@ void Producer::Poll() {
345344 m_client->poll (0 );
346345}
347346
348- Baton Producer::SetPollInBackground (bool set) {
349- scoped_shared_read_lock lock (m_connection_lock);
350- rd_kafka_t * rk = this ->m_client ->c_ptr ();
351- if (!IsConnected ()) {
352- return Baton (RdKafka::ERR__STATE, " Producer is disconnected" );
353- }
354-
355- if (set && !m_is_background_polling) {
356- m_is_background_polling = true ;
357- rd_kafka_queue_t * main_q = rd_kafka_queue_get_main (rk);
358- rd_kafka_queue_t * background_q = rd_kafka_queue_get_background (rk);
359- rd_kafka_queue_forward (main_q, background_q);
360- rd_kafka_queue_destroy (main_q);
361- rd_kafka_queue_destroy (background_q);
362- } else if (!set && m_is_background_polling) {
363- m_is_background_polling = false ;
364- rd_kafka_queue_t * main_q = rd_kafka_queue_get_main (rk);
365- rd_kafka_queue_forward (main_q, NULL );
366- rd_kafka_queue_destroy (main_q);
367- }
368-
369- return Baton (RdKafka::ERR_NO_ERROR);
370- }
371-
372347void Producer::ConfigureCallback (const std::string& string_key,
373348 const v8::Local<v8::Function>& cb, bool add) {
374349 if (string_key.compare (" delivery_cb" ) == 0 ) {
0 commit comments