Recommendation to Change From 32 to 64 Bit When Storing Message IDs

Back to all posts
Recommendation to Change From 32 to 64 Bit When Storing Message IDs

If you are storing GatewayAPI message IDs in a separate system, and you use 32 bit to do this, we recommend that you change to 64 bit as soon as possible.

The reason why we recommend this is that the limit of what 32 bit can support has been reached – about 2.15 billion units. We assign numbers consecutively to the message IDs and since we have sent over 2.15 billion messages since GatewayAPI was founded, the message IDs have now exceeded the limit of 32 bit.

By changing to 64 bit you reach a new limit that is so large that it is theoretically impossible to exceed the maximum value. Specifically, at 64 bit the maximum value is a whopping 9 quintillion (9,223,372,036,854,775,807)! 

If you are just using GatewayAPI and don’t transfer message IDs to your own system, you can ignore the information provided in this blog post.

Person working with text strings on computer

Recommendation to use text strings instead of numbers

We also recommend that you process message IDs as a text string instead of a number. 

Some time in the future, we may switch to unique IDs, which instead of consisting exclusively of numbers, consist of a randomly generated mix of numbers, letters and characters. YouTube is a good example of this, and if you for example look at the URL of our GatewayAPI presentation video, you can see how it looks:

By treating message IDs as a text string today already, you will thus ensure that you don’t experience similar limitations in the future.

Our support team is ready to help

Any questions?

If you have any questions about the information above, you are always welcome to contact us on the support chat or at