Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
djdance opened this issue Mar 16, 2023 · 5 comments

Comments

@djdance
Copy link

djdance commented Mar 16, 2023

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

@ikilobyte
Copy link
Owner

ikilobyte commented Mar 18, 2023

@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.

@ikilobyte
Copy link
Owner

ikilobyte commented Mar 18, 2023

@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!

@djdance
Copy link
Author

djdance commented Mar 18, 2023

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

@ikilobyte
Copy link
Owner

@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.

@djdance
Copy link
Author

djdance commented Mar 18, 2023

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants