massakam commented on a change in pull request #200:
URL: https://github.com/apache/pulsar-client-node/pull/200#discussion_r825615679



##########
File path: src/Consumer.cc
##########
@@ -79,144 +81,131 @@ void MessageListener(pulsar_consumer_t *cConsumer, 
pulsar_message_t *cMessage, v
   listenerCallback->callback.Release();
 }
 
-void Consumer::SetCConsumer(std::shared_ptr<CConsumerWrapper> cConsumer) { 
this->wrapper = cConsumer; }
-void Consumer::SetListenerCallback(ListenerCallback *listener) {
+void Consumer::SetCConsumer(std::shared_ptr<pulsar_consumer_t> cConsumer) { 
this->cConsumer = cConsumer; }
+void Consumer::SetListenerCallback(MessageListenerCallback *listener) {
   if (listener) {
+    // Pass consumer as argument
+    listener->consumer = this;
+  }
+
+  if (this->listener == nullptr) {

Review comment:
       ```suggestion
     } else {
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to