开发者

NServiceBus - How to pass custom headers in the Message envelop?

I want to be able to attach the windows authentication token without having to include that piece of dat开发者_如何学JAVAa on the messages themselves.

I've noticed that TransportMessage has Headers, but how do I get access to that before Send message to server?


See the Header Manipulation Sample there you'll see how to use headers.

To set a constant outgoing header for a client (suitable for the auth token you want), see Writing outgoing headers for all outgoing-messages

On the server, you can then Read the header.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜