Replies: 1 comment 1 reply
|
Yeah... I think it is better to expose a I'll convert this into an issue when we agree with you about possible solution. For now I can suggest your to look into a wrapper You also can look into this old solution of ours: https://github.com/spring-attic/spring-cloud-stream-binder-jms/blob/master/spring-cloud-stream-binder-jms-common/src/main/java/org/springframework/cloud/stream/binder/jms/utils/JmsMessageDrivenChannelAdapterFactory.java |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm making a custom cloud-stream-binder for a jms middleware, and I'm using
JmsMessageDrivenEndpointasMessageProducer.It requires a
ChannelPublishingJmsMessageListenerwhere I had difficulties in applying theRetryTemplatebuilt byAbstractBinderto that I can makemaxAttemptsproperty take effect.Let's have a look at method
public void onMessage(javax.jms.Message jmsMessage, Session session)in it.As you can see, it's impossible to capture the
requestMessagefrom outside and put it into theReteyContextunless repeating the whole process to build an Integration Message totally for error handling purpose. (AndmessageConverter,headerMapper, etc. cannot be accessed from sub-classes)Maybe I should write a new
MessageListenerwhich means I must give upJmsMessageDrivenEndpointas well (obviously not an option for me). Now I "solved" it by producing a identical message in the subclass, like code attached below:Would it possible to extract the send process to a method like
sendAndReceiveReplyor allow a customMessageGateway? Thanks.All reactions