You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CustomMessageInterceptor implements MessageInterceptor specifying generic type (implements MessageInterceptor<CustomDtoContainer>).
Issue comes in override intercept method: I do call message.getPayload().getCustomDto() and failing because of getPayload returns String and I cannot cast String to CustomDtoContainer
Assumption: I guess it is being designed in the way to make Interceptor as much generic as possible but why I can define the Message type in generic here? It seems like converter I defined at SqsConfig being ignored and not used for the interceptors mapping (because it is too much early stage)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Used framework versions:
spring-cloud-aws-starter-sqs: 3.3.0
spring-boot: 3.4.5
Spring sqs config:
`
CustomMessageInterceptor implements MessageInterceptor specifying generic type (implements MessageInterceptor<CustomDtoContainer>).
Issue comes in override intercept method: I do call message.getPayload().getCustomDto() and failing because of getPayload returns String and I cannot cast String to CustomDtoContainer
Assumption: I guess it is being designed in the way to make Interceptor as much generic as possible but why I can define the Message type in generic here? It seems like converter I defined at SqsConfig being ignored and not used for the interceptors mapping (because it is too much early stage)
Beta Was this translation helpful? Give feedback.
All reactions