Potentially invalid RabbitMQ deliveryTag type.

przemyslaw.szychowski Spryker Customer Posts: 5 🧑🏻‍🚀 - Cadet


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


  • profuel
    profuel SSA Sprykee Posts: 19 🧑🏻‍🚀 - Cadet

    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.