Hi @anan1401,
User properties can be directly accessed as Spring message headers.
For example, suppose you published a message containing a string user property called some-user-property
, you can then get it in your consumer as follows:
@Bean
public Consumer<Message<?>> sink(){
return message -> {
message.getHeaders().get("some-user-property", String.class);
// other message processing
};
}
On the other hand, if what you’re asking about are SDTMap
payloads, then you can get that as-if you’re getting any other type of message payload.
e.g.:
@Bean
public Consumer<SDTMap> sink(){
return payload -> {
// Do something with this SDTMap payload
};
}