camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Tam" <>
Subject Re: [PROPOSAL] ProtocolMessage
Date Tue, 24 Jun 2008 15:15:52 GMT
> I guess the tricky thing is - what is a 'protocol header'?
> e.g. take HTTP and JMS as examples; you can specify your own headers
> which a receiver may or may not understand. You can do the same with
> SOAP. What constitutes a 'protocol header' in the general sense?
> Since its such a grey area I'd always kinda thought it was up to an
> endpoint to decide what headers it considered part of the protocol.

Protocol headers in my mind get transmitted as part of the message
over the wire.  They can be user-defined if the protocol supports it.
I agree that an endpoint (ultimately) gets to decide what they headers
are.  For example an endpoint can reject headers that are not
appropriate to be included before sending it out.   There are many
occasions that objects are added to Message.setHeader() but they are
not meant to be protocol headers.

> We could certainly add some kinda header letting folks describe which
> headers are expected to be part of the protocol? Or maybe configure -
> say - the CXF endpoint to exclude headers of certain
> names/shapes/types etc
> Another option I guess is to reserve message headers only for protocol
> related stuff; and use Exchange properties for anything else?

I like the last option.  Can we restrict the value type to String
(i.e. String getHeader(String key)) and deprecate the old methods?


> --
> James
> -------
> Open Source Integration

View raw message