Instead add it to the collection and use that info to set the header at a later stage in the pipeline. See https://github.com/Particular/NServiceBus.Gateway/pull/104#discussion_r222455327