JeroenJansze1989 opened a new issue, #114:
URL: https://github.com/apache/pulsar-client-python/issues/114

   **Describe the bug**
   Trying to use the consumer acknowledge_cumulative(msg) functionality. The 
python shell stops with Segmentation fault (core dumped). Expected is to ack 
the messages until the current message in the stream or at least to have error 
handling available to the python interpreter.
   
   **To Reproduce**
   1、Test Conditions
   - Setup a python client
   - Subscribe to a topic 
   - Consume 1 or more messages
   - Call consumer.acknowledge_cumulative(msg) or consumer = 
acknowledge_cumulative(msg.message_id()) with the latest message received.
   
   2、Test code
   
   ```
   import pulsar
   from _pulsar import InitialPosition
   from pulsar import Client, ConsumerBatchReceivePolicy, ConsumerType
   
   pulsar_client = Client(pulsar_host, 
authentication=authentication_provider.get_authenticator()) # This is a 
AuthenticationToken 
   consumer = pulsar_client.subscribe(
     topic=topic,
     subscription_name=consumer_id,
     initial_position=InitialPosition.Earliest,
     consumer_type=ConsumerType.KeyShared,
   )
   
   # Given some message on the topic
   message = consumer.receive()
   print(message.data()) # b'{"test": "test6"}'
   message = consumer.receive()
   print(message.data()) # b'{"test": "test8"}'
   
   consumer.acknowledge_cumulative(message)
   ```
   
   **error log**
   Starting shell with `python3 -q -X faulthandler`
   
   ```
   Fatal Python error: Segmentation fault
   
   Current thread 0x00007f22216e0000 (most recent call first):
     File 
"/home/ubuntu/.local/lib/python3.10/site-packages/pulsar/__init__.py", line 
1300 in acknowledge_cumulative
     File "<stdin>", line 1 in <module>
   
   Extension modules: charset_normalizer.md, _cffi_backend (total: 2)
   Segmentation fault (core dumped)
   ```


-- 
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: commits-unsubscr...@pulsar.apache.org.apache.org

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

Reply via email to