Immediate application shutdown after succesful start

gerhardo Member Posts: 6

Hi !
I have the following problem and no clue why the application behaves as described:
I created a spring boot cloud stream application with gradle or maven (same behaviour) and added a subscription to a durable queue for consuming messages send to the topic. The application starts succesful but is followed by an immediate shutdown. It looks like someone is pressing Ctrl-C to stop the application.

 :: Spring Boot ::        (v2.2.6.RELEASE)

2020-06-03 10:55:09.200  INFO 1272 --- [           main] spring.boot.Application                  : Starting Application on CE33088 with PID 1272 (C:\Users\geotte\work\dev\nas\template\spring-boot-solace\bin\main started by geotte in C:\Users\geotte\work\dev\nas\template\spring-boot-solace)
2020-06-03 10:55:15.432  INFO 1272 --- [           main] spring.boot.Application                  : Started Application in 7.563 seconds (JVM running for 9.291)
2020-06-03 10:55:15.450  INFO 1272 --- [extShutdownHook] c.s.j.protocol.impl.TcpClientChannel     : Channel Closed (smfclient 2)
2020-06-03 10:55:15.457  INFO 1272 --- [extShutdownHook] c.s.s.c.s.b.i.JCSMPInboundChannelAdapter : Stopping consumer flow from queue app/created/ <inbound adapter ID: 73a4f0c0-f608-4218-b0e6-9fc0ffa74db9>

My Gradle build file looks like this:

plugins {
    id 'java'
    id 'org.springframework.boot' version '2.2.6.RELEASE'
    id 'io.spring.dependency-management' version '1.0.9.RELEASE'

repositories {
    // Use jcenter for resolving dependencies.
    // You can declare any Maven/Ivy/file repository here.

dependencies {
    implementation platform('')
    implementation platform('')
    implementation ''

If i add a web starter to the application the application keeps running because of the tomcat and receives events. But this can not be the solution.
Thank you and best regards,


  • uherbst
    uherbst Member, Employee Posts: 121 Solace Employee

    Just a guess: You have no permissions to subscribe - maybe something in your acl profile or client-profile.
    Do you have access to broker logs ? Have a look at event.log.
    If not: If you have access to cli, you can do something like

    show log event lines 20
  • gerhardo
    gerhardo Member Posts: 6

    Ok, finally I found the "solution":
    The application must have a consumer and a supplier and both must be listed in the function paragraf in the solace stream. If I omit the supplier from the application or does not name it in the descriptor the application shuts down immediatly.
    Now the working application looks like this:

    public class Application {
        private static final Logger logger = LoggerFactory.getLogger(Application.class);
        public static void main(String[] args) {
        public Consumer<String> appCreatedConsumer() {
            return String -> {
                System.out.println("String created: " + String);
        public Supplier<String> appCreatedSupplier() {
            return () -> new String("Test");

    and my application.xml looks like this:

            definition: appCreatedConsumer;appCreatedSupplier
              destination: app/created/consumer
        host: 'tcp://'
        msgVpn: default
        clientUsername: admin
        clientPassword: admin
        root: info
          springframework: info

    BR Gerhard

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

    Hi @gerhardo,
    What you've found is indeed a bug that we're already working on a fix for and it will be fixed in the next release of the Solace Spring Cloud Stream binder. Both solutions that you've found will work in the meantime (adding a web starter or having a supplier as part for your microservice) but once the next release is available those workarounds will no longer be necessary.

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

    Actually, looks like the fix has already been merged into the master branch if you want to try it out prior to the next release:

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

    And a release with this fix has been cut! It should be up in maven central sometime tomorrow.
    In the meantime you can find it here:

  • gerhardo
    gerhardo Member Posts: 6

    Hi @marc
    the new version 1.0.1 works as expected without the above workarounds. Thx.
    BR Gerhard

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

    Excellent, thanks for letting us know!