Couldn’t convert value : [email protected] into a valid com.company.project.domain.package.SomeClass
It looks like are just sending the class name as a String.
This is the default toString()
implementation on Object
.
i.e. SomeClass.getName()
instead of someClass.getName()
(assuming there is a getName()
method on the class.
EDIT
I didn’t notice it was a header, sorry.
The message converter only performs conversion on the payload.
For headers, you need to implement a custom HeaderMapper
– Spring just passes headers to the amqp-client, which does a toString()
on types it doesn’t know.
Subclass the DefaultAmqpHeaderMapper
and override populateUserDefinedHeader
on the outbound side and extractUserDefinedHeaders
on the inbound side.
CLICK HERE to find out more related problems solutions.