Solace Community is getting a facelift!

On March 3rd we will be starting the process of migrating Solace Community to a new platform. As a result, Solace Community will go in to a temporary read-only state. You will still be able to come onto Solace Community and search through posts to find answers, but you won't be able to ask questions, post comments, or react in any way.

We hope to have the migration complete by Wednesday March 5th (or sooner), so please keep an eye out!

Spring Cloud Stream Binder - Sending Persistent Messages with StreamBridge

Good morning everyone,

using the spring-cloud-stream-binder-solace sending Messages via the StreamBridge, is there a possibility to send persistent Messages? "show client ... stats" only reports non-persistent messages beeing sent by the application.

Thank you guys for your support and have a great day!
Timo

Comments

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 973 admin
    edited February 2021 #2

    Hi @timob,
    The Spring Cloud Stream binder actually only supports sending of Persistent messages. When you look at the show client ... stats results keep in mind that they are from the perspective of the broker. So Received is actually received by the broker and sent by the application.

    I tested this quickly locally and see streambridge publishing Persistent messages via show client ... stats.

    Hope that helps!

  • timob
    timob Member Posts: 11

    Hi @marc ,
    Thank you for your quick reply. I unfortunately don't see any persistent messages yet via "show client ... stats". Which message object do you pass to the StreamBridge or how do you call the StreamBridge in your code?
    Best,
    Timo

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 973 admin

    Hi @timob,
    I'm just using this simple function and publishing to it using the "Try-Me" functionality in the PubSub+ Manager (publish to the uppercase-in-0 topic if you haven't configured the binding. But at the end of the day it shouldn't matter what you're sending. The Cloud Stream binder doesn't support direct messaging and will only publish Persistent messages. If you turn off the ability to "Send Guaranteed Messages" in your client-profile you'll even see that it fails to connect.

    Can you share a screenshot of what you're seeing from the show client XXXX stats command?

        @Bean 
        public Consumer<String> uppercase(StreamBridge sb){
            return v -> {
                System.out.println("Uppercasing: " + v);
                sb.send("foo/uppercase", v.toUpperCase());
                sb.send("foo/lowercase", v);
            };
        }
    

This Month's Leaders

This Week's Leaders