Serial number details in specification

Thomas Kluyver thomas at
Fri May 10 11:09:10 UTC 2019

The specification only requires that a message's serial number "must not be zero". Calling it a serial number suggests that each message sent on a connection gets the next available number. But is any level of this pattern required?

In particular, if I have sent a message with serial 5:

- Must the next message have serial 6?
- Must later messages all have serials > 5 (monotonically increasing)?
- Must later messages have serials != 5 (no repetition)? If I'm not expecting a reply to the previous message, is it legal to reuse its serial number?

It's obviously easy in most cases to satisfy any of these conditions, but I'm interested in how many are required. E.g. if a client is preparing and sending messages separately, does it need to make sure that they are sent in serial number order? Or if a long-running client uses every possible serial number, does it need to open a new connection to continue sending?


More information about the dbus mailing list