Hi @marc, an update for the thread for those interested…
When an application using jcsmp is the requestor, and sends those requests with the blocking call, any reply messages sent using spring cloud stream will fail to correlate back and a timeout exception is thrown.
For Requestor.request:
BytesXMLMessage request(XMLMessage request,
long timeoutMillis,
Destination sendDestination)
throws JCSMPException
Blocking mode
The timeoutMillis parameter controls whether this call should operate in a blocking fashion.
If >0, the call blocks for up to the number of milliseconds specified by timeoutMillis while the Requestor waits for a reply. If none is received during this time, a JCSMPRequestTimeoutException is thrown.
If 0, the call returns null after the request message has been sent. The application should then examine incoming messages on a XMLMessageConsumer or its XMLMessageListener for a reply, which will be sent to the Destination specified in the request’s ReplyTo header field. To correlate replies to sent requests, an application can use the CorrelationId field on outgoing requests.
The issue seems to be the reply messages coming back not having the isReply
attribute set on them. If the application was using jcsmp, the XMLProducer.sendReply call takes care of automatically setting this.
Automatically copies requestMessage’s CorrelationId to replyMessage and sets the reply attribute on the latter. replyMessage is sent to the Destination returned by requestMessage.getReplyTo().
If sending that message without that convenience function, then you would have called this:
setAsReplyMessage(true)
The only way to make it work is to send the requests non-blocking, and then asychronously handle all the reply messages that arrive in onReceive
and do correlation yourself using the value in correlationID
.
Since the Solace Binder allows the reply-to destination for a message to be set using the special solace_replyTo
message header, there should be a way to allow the isReply
attribute to be set on outbound messages too?
Perhaps a new solace_setAsReply
header?