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 solace binder connection

Shruti
Shruti Unconfirmed, Member Posts: 1

Hi Team,

I am trying to connect to solace using spring cloud stream solace binder with all the properties in application.yaml . It keeps giving error for connecting to localhost. Error creating bean with name 'com.solace.spring.cloud.stream.binder.config.SolaceMessageChannelBinderConfiguration': Invocation of init method failed; nested exception is com.solacesystems.jcsmp.JCSMPTransportException: (Client name: NL-C02FH05NMD6W/50490/#001e0002/N3JS4tsT8l  Local port: -1  Remote addr: localhost Remote port: 55555) - Error communicating with the router.Also find attached my properties file.

Where as in my application.yaml I have a completely different host than localhost.

Snapshot of my application.yaml


spring:
  cloud:
    function:
      definition: sink
    stream:
      bindings:
        sink-in-0:
          destination: 'ATP-ORDER-EVENTS-QUEUE'
          group: clientAck
          content-type: 'application/octet-stream'
          consumer:
            batch-mode: true
            useNativeDecoding: true
      binders:
        local-solace:
          type: solace
          environment:
            solace:
              java:
                host: tcps://int-gke-euwe4-int-ingka.messaging.solace.cloud:55443
                msgVpn: int-gke-euwe4
                clientUsername: 
                clientPassword: 
      solace:
        bindings:
          sink-in-0:
            consumer:
              #This adds a topic subscription w/ wildcards to the queue created with a name of TEMPS.Q.SINK above
              queueAdditionalSubscriptions: ingka.om.ado/fulfillmentOrder/full/allocated/1.0/EU/ISOM/RS/>


Answers

  • amackenzie
    amackenzie Member, Employee Posts: 270 Solace Employee

    It might be the binder name not being referenced and defaulting to a binder default localhost.

    Under binders: can you name it something other than `local-solace`? Then under the sink-in-0 section add `binder-name: <yournewname>`

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 973 admin
    edited May 2022 #3

    Hi @Shruti,

    I'm curious if you figured it out. Your configuration looks correct to me but it can be tricky to troubleshoot yaml files w/ spaces.

    Also, I think Spring Boot will accept application.yml or application.yaml but for kicks can you test application.yml instead?

This Month's Leaders

This Week's Leaders