Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultKafkaHeaderMapper - should allow arrays of String by default #1550

Closed
vgheo opened this issue Jul 28, 2020 · 0 comments · Fixed by #1551
Closed

DefaultKafkaHeaderMapper - should allow arrays of String by default #1550

vgheo opened this issue Jul 28, 2020 · 0 comments · Fixed by #1551

Comments

@vgheo
Copy link

vgheo commented Jul 28, 2020

I'm using spring-kafka / spring-integration-kafka to implement a kafka-to-email integration.

The Spring Integration Mail requires some headers to have java.lang.String[] ( specifically, the TO field).

This all works fine on the producer and the integration service, except that the TO header field is mapped to a NonTrustedHeaderType instance.

As a work-around - customize the inboundChannelAdapter with a DefaultKafkaHeadersMapper that accepts any java type.

1/ I think it makes sense to also trust arrays of trusted types by default

2/ Would be nice to document how to configure the mapper to accept arrays of a specific type.

@garyrussell garyrussell added this to the 2.6.M1 milestone Jul 28, 2020
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Jul 28, 2020
Resolves spring-projects#1550

- trust arrays of trusted types (including arrays of primitive wrappers)
- trust arrays of primitives
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Jul 28, 2020
Resolves spring-projects#1550

- trust arrays of trusted types (including arrays of primitive wrappers and String))
- trust arrays of primitives
artembilan pushed a commit that referenced this issue Jul 29, 2020
Resolves #1550

- trust arrays of trusted types (including arrays of primitive wrappers and String))
- trust arrays of primitives
garyrussell added a commit that referenced this issue Jul 29, 2020
Resolves #1550

- trust arrays of trusted types (including arrays of primitive wrappers and String))
- trust arrays of primitives
garyrussell added a commit that referenced this issue Jul 29, 2020
Resolves #1550

- trust arrays of trusted types (including arrays of primitive wrappers and String))
- trust arrays of primitives
garyrussell added a commit that referenced this issue Jul 29, 2020
Resolves #1550

- trust arrays of trusted types (including arrays of primitive wrappers and String))
- trust arrays of primitives
garyrussell added a commit that referenced this issue Jul 29, 2020
garyrussell added a commit that referenced this issue Jul 29, 2020
garyrussell added a commit that referenced this issue Jul 29, 2020
garyrussell added a commit that referenced this issue Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants