ikilobyte/pulsar-client-php

consumer ack: Negative integers are only supported with GMP or BC (64bit) intextensions.

djdance opened this issue · 5 comments

failed to do

$consumer->ack($message);

with error Negative integers are only supported with GMP or BC (64bit) intextensions.

What should I do, what's wrong in the message (or consumer) ? thanks

@djdance Hi,

Thanks for your feedback on the Pulsar Client for PHP library. To better understand and address the issue you're experiencing, could you please provide us with the following information:

  • Sample code that reproduces the issue you're encountering.
  • The version of Pulsar that you're using.
  • Details about your runtime environment, including the operating system and PHP version.

@djdance
Based on the error message you provided, it appears to be an error thrown from protobuf-php/protobuf. The error file can be found at: https://github.com/protobuf-php/protobuf/blob/master/src/Binary/Platform/InvalidNegativeEncoder.php.

You may try installing the GMP extension to see if the issue persists. Alternatively, please provide us with your sample code and environment information. Your feedback will help us improve the library.

Thank you for your cooperation!

Thank you, @ikilobyte , but most of all I am interesting in, what's wrong in the message received?
In other words, imagine that I can not install GMP/BC.
How could I change something on my side or in Pulsar to fix this crash?
Change any negative ID in data of a message?
Why do I need this Negative integers for ack? may I turn it off without extra libraries and php reinstalling ?

thanks again

@djdance
Sorry, based on my initial assessment, it appears to be an issue with the protobuf library. In order for me to reproduce the issue, I would need you to provide sample code and Pulsar message IDs. Without this information, I am unable to determine the root cause based solely on the error message.

I understand, no problem.
Let the message contains the following negative values
partition: -1 batch_index: "-1"
Could it be the reason?

How can I get rid of any field from the message before ack?
I didn't find any function to operate message content..