Spring Cloud Stream msgTtl on producer/supplier binding
Hi there
I tried this:
spring.cloud.stream.bindings.bookSupplierV1-out-0.destination=v1/bookJson spring.cloud.stream.bindings.bookSupplierV1-out-0.binder=solace1
This works.
But when I do this in addition:
spring.cloud.stream.solace.bindings.bookSupplierV1-out-0.producer.msgTtl=23000
no message is sent to the destination.
The value in the SolaceProducerProperties is set to: 23000
This is also set:
xmlMessage.setTimeToLive(producerProperties.getMsgTtl());
public XMLMessage map(Message<?> message, SolaceProducerProperties producerProperties) {
XMLMessage xmlMessage = map(message);
xmlMessage.setDMQEligible(producerProperties.isMsgInternalDmqEligible());
if (producerProperties.getMsgTtl() != null) {
xmlMessage.setTimeToLive(producerProperties.getMsgTtl());
}
return xmlMessage;
}
Is this a bug or am I missing something?
Tagged:
Comments
Hi @Mike13 ,
Weird, it's working for me. Are you getting any sort of errors on app startup? I'm trying to think of a reason it wouldn't actually send the message. This what I did just to try it out in a simple app:
Version info from pom
And then listening with

sdkperf
I can see the messages with the TTL set:Hi @marc
I have not seen any error message.
It seems like it works with one binder (Solace), but with two binders (Solace and Kafka), like we have in our test project, it doesn't work. I need to take a closer look at this...
Hey @Mike13, that's intriguing. Let me know what you find! I didn't have much time to look into it but I did quickly try using two solace binders in the same app and it continued working. Weird that for some reason using the Solace and Kafka binders together would act differently.
As a heads up I'm going out on vacation for the holidays so if I don't get back to you in a timely manner that's why