Potentially invalid RabbitMQ deliveryTag type.
Hello,
I found that Spryker defines QueueReceiveMessageTransfer::deliveryTag
as string.
Is it correct?
RabbitMQ documentation says it is longlong
, so shouldn't it be int
in PHP?
See https://www.rabbitmq.com/amqp-0-9-1-reference.html#domain.delivery-tag
Comments
-
hi, @przemyslaw.szychowski !
That's an interesting finding, though I think it doesn't require any updates in the Vendor code.
longlong is essentially int(64), and thus it could be safely stored in the string.
Since the object is not directly related to the RMQ, string type makes it possible to store any value, not only RMQ specific number.
If you think that due to performance limitations type is important, I suggest you to create an additional field and store integer value there.
Brief check of the Php AMQP library shows that the change of the type might be needed, once it starts using strict types.
1 -
Thank you for the answer. You are right, string can store integer, so everything works until strict types are used.
I found it when I needed to have custom retry/error handling logic and as I'm using strict types, PHP started to throw errors.
I handled it in my code, but it may be good to make vendor module compatibile with Php AMQP.
3 -
Could you please create a suggestion in our module?
This will help us handle the issue.
Thanks for highlighting this!
-1
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 69 Spryker News
- 894 Developer Corner
- 757 Spryker Development
- 83 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 22 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random