Support for protocol v5 messages


Supporting the new features implemented in v5


10. Changes from v4

* Beta protocol flag for v5 native protocol is added (Section 2.2)

* <numfailures> in Read_failure and Write_failure error message bodies (Section 9)
has been replaced with <reasonmap>. The <reasonmap> maps node IP addresses to
a failure reason code which indicates why the request failed on that node.

* Enlarged flag's bitmaps for QUERY, EXECUTE and BATCH messages from [byte] to [int]
(Sections 4.1.4, 4.1.6 and 4.1.7).

* Add the duration data type

* Added keyspace field in QUERY, PREPARE, and BATCH messages (Sections 4.1.4, 4.1.5, and 4.1.7).

* Added now_in_seconds field in QUERY, EXECUTE, and BATCH messages (Sections 4.1.4, 4.1.6, and 4.1.7).

* Added [int] flags field in PREPARE message (Section 4.1.5).

* Removed NO_COMPACT startup option (Section 4.1.1.)


The goal of this ticket is to allow the driver to properly eval messages in a v5 format. Any other infrastructure changes that arise as a result of these changes may or may not be included... the key part is to get message handling working again. See as an example; this functionality would be nice to have but isn't explicitly required to get messaging working.

Spawn off from work on


Note that while add some support for the duration type it did so in the context of v4, so extending that support to v5 would still be part of this ticket.



Pull Requests





Bret McGuire