Allow setting an optional EndToEndId

With this change it is possible to specify an explicit EndToEndId. The
change does not interfere with existing implementations.