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 |
Beta Was this translation helpful? Give feedback.
-
I'm making a custom cloud-stream-binder for a jms middleware, and I'm using
JmsMessageDrivenEndpoint
asMessageProducer
.It requires a
ChannelPublishingJmsMessageListener
where I had difficulties in applying theRetryTemplate
built byAbstractBinder
to that I can makemaxAttempts
property 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
requestMessage
from outside and put it into theReteyContext
unless 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
MessageListener
which means I must give upJmsMessageDrivenEndpoint
as 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
sendAndReceiveReply
or allow a customMessageGateway
? Thanks.Beta Was this translation helpful? Give feedback.
All reactions