- missing `}` in one code snippet caused syntax-highlighting problems in asciidoc-aware editors such as atom
- use spaces, not tabs for code snippets
- Change markdown to asciidoc for one snippet
Fixed support for partition properties to be Spring configured
- Fixed support for 'partitionKeyExtractor' and 'partitionSelector' to be Spring configured
- Added new producer properties 'partitionKeyExtractorName' and 'partitionSelectorName'
- Deprecated 'partitionKeyExtractorClass' and 'partitionSelectorClass' properties
- Removed InitilaizingBean from MessageConverterConfigurer
- Updated documentation
- Added additional tests
- Removed PartitionedProducerTest as redundant
- Fixed unrelated to this effort BinderPropertiesTests due to recent Boot changes
polishing
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/12
Support late binding for binders that don't inherently support it.
Schedule attempts at 30 second intervals (default, configurable).
`IllegalState` and `IllegalArgument` exceptions are fatal.
Add test cases (mocks) to verify rebind after failure
Docs
Polishing - always use the setter on LateBinding
Remove volatile from the fields since they are only accessed from synchronized methods.
See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/236
- add `none` as a synonym for `HeaderMode.raw`
- add `headers` meaning "use native headers"
- change the default header mode - `null`
- remove `supportsHeadersNatively` - allow binders to chose header mode for each binding
binders decide their own default when the property is null
- Rabbit will choose `headers` as default (but can be overridden to `none` for a binding)
`embeddedHeaders` will not be allowed
- Kafka will choose `embeddedHeaders` as default for compatibility with 1.x peer apps
- remove deprecations on header embedding code
Polishing; support fallback
- if the consumer side is configured to support embedded headers,
binders should look for native headers first and signal their presence
using the `BinderHeaders.NATIVE_HEADERS_PRESENT` header;
fall back to embedded headers if it appears the payload might contain
them
- remove support for XD embedded headers (first byte < 0xff)
- add a quick check for embedded headers by examining the first byte for 0xff
- change the log from error to debug when decoding embedded headers fails
- see the kafka binder PR for a test case with a consumer that can handle all
message flavors (native, embedded, and no headers).