Try PubSub+

Spring Cloud Stream msgTtl on producer/supplier binding

Mike13Mike13 Member Posts: 21

Hi there
I tried this:

This works.
But when I do this in addition:

no message is sent to the destination.

The value in the SolaceProducerProperties is set to: 23000
This is also set:

public XMLMessage map(Message<?> message, SolaceProducerProperties producerProperties) {
XMLMessage xmlMessage = map(message);
if (producerProperties.getMsgTtl() != null) {
return xmlMessage;

Is this a bug or am I missing something?


  • marcmarc Member, Administrator, Moderator, Employee Posts: 230 admin

    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

    public class DemoApplication {
        public static void main(String[] args) {
  , args);
        public Supplier<String> supplier(){
            return () -> {
                System.out.println("Sending Hello World");
                return "Hello World";
          definition: supplier
              destination: output/test
                  msgTtl: 23000

    And then listening with sdkperf I can see the messages with the TTL set:

  • Mike13Mike13 Member Posts: 21

    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...

  • marcmarc Member, Administrator, Moderator, Employee Posts: 230 admin
    edited December 2020

    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 :)

Sign In or Register to comment.