* Handle errors for non-existing topics
When topic creation is disabled both on the binder and the broker,
the binder currently throws an NPE. Catching this situation and
throw a more graceful error to the user.
Adding tests to verify.
Resolves#513
* Addressing PR review comments
Temporarily provide a custom HeaderMaper as part of the binder that is
copied from Spring Kafka so that we can preserve backward compatibility
with older producers. When older producers send non String types,
the header mapper in Spring Kafka treats that as MimeType. This change will
use a HeaderMppaer that reinstates the MimeTypeJsonDeserializer.
When we can consume the Spring Kafka version that provides the HeaderMapper
with this fix in it, we will remove this custom version.
Resolves#509
When Kafka Streams binder is used in multi binder environments, the properties defined under environment
is not propagated to the auto configuration class. The environment processing only takes place when the
actual binder configuration is instantiated (for example, KStreamConfiguration), and therefore the environment
properties are unavailable during the earlier autoconfiguration. This change makes the environment properties
availble during auto configuration.
Resolves#504
Remove the usage of `ImportBeanDefinitionRegistrar` in Kafka Streams binder
components since the regular use of getBean from the outer context is safe to do so.
Unignore tests
Resolves#501
* Addressing PR review comments
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/502
Before applying the fix for,
https://github.com/spring-cloud/spring-cloud-stream/issues/1531
failed with:
```
org.springframework.messaging.MessageDeliveryException: failed to send Message to channel 'test.output'; nested exception is java.lang.IllegalArgumentException: Partition key cannot be null, failedMessage=GenericMessage [payload=byte[3], headers={kafka_partitionId=5, id=3350a823-c876-f7a9-f98b-fdbd2aaa4c12, timestamp=1542823925354}]
...
Caused by: java.lang.IllegalArgumentException: Partition key cannot be null
at org.springframework.util.Assert.notNull(Assert.java:198)
at org.springframework.cloud.stream.binder.PartitionHandler.extractKey(PartitionHandler.java:112)
at org.springframework.cloud.stream.binder.PartitionHandler.determinePartition(PartitionHandler.java:93)
at org.springframework.cloud.stream.binding.MessageConverterConfigurer$PartitioningInterceptor.preSend(MessageConverterConfigurer.java:381)
at org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:589)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:435)
... 31 more
```
Resolves#503
Instead of checking for the text TopicExistsException in the exception
message, use strong type check for TopicExistsException through instanceof on
the cause of the exception.
Adding test to verify.
Resolves#209
Address checkstyle errors and warnings in spring-cloud-stream-binder-kafka-core.
Remove a duplicate dependency declaration from parent pom.
Resolves#483Resolves#484
* Use content type header from the record for binder provided inbound deserialization by
making use of the header support added in Kafka Streams. If there is a content type set
on the incoming record, that will get precedence.
* Introduce a new Composite Serde class for providing non-native Spring Cloud Stream specific collection
of Serde implemenations. This is needed in order for things like avro converters that interact with
the Spring Cloud Stream schema registry server.
* Adding tests
* Polishing
Resolves#456, #469
* Consumer concurrency settings in Kafka Streams binder
* If the consumer concurency settings are provided at the binding level,
honor that before falling back to the defaults.
* Allow consumer binding specific broker configurations to be set from the application.
* Test changes.
Resolves#474
* Addressing PR review comments
This makes metrics available for anonymous consumers as well.
A couple of tests to verify that TopicInformation is built correctly
Removing unneeded import
* Addressing startOffset in Kafka Streams binder
Fixing the issue where auto.offset.reset is not honored through startOffset
provided by the individual consumer binding.
Adding integration test to override auto.offset.reset globally at the binder
level to latest and then set startOffset on individual binding to earliest.
Resolves#467
* Addressing PR review comments
* Addressing PR review comments
If the destination topic is pattern based, only do the basic up/down check
in the health indicator. In this case, the health indicator does not do any
partitions queries as it does for normal topics.
Resolves#430
Disable Kafka health indicator check if management.health.binders.enabled
property is set to false. Currently, if this property is disabled, only the
core spring-cloud-stream mechanism of collecting the health checks are disabled.
The indivividual binders can still register the health check bean and boot health
actuator will still pick it up. If the user turns off health check by disabling
this property, then the stream app should completely disable any binder specific
health check.
Resolves#454