AMQP endpoint with spring solace starter configuration

Fahmi
Fahmi Member Posts: 3

Hello,
I'm using the starter "com.solace.spring.boot:solace-jms-spring-boot-starter:3.2.1" in my spring managed project.
I want to use the protocol amqp over JMS but when I configure the server host to:
solace.jms.host: amqps://localhost:5671 (instead of tcp://localhost:55555)
This does not works and I got the error:

org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JMS processing; nested exception is com.solacesystems.jms.ConfigurationException: Invalid scheme "amqp" in host "amqp://localhost:5672"

Concerning the server, for test puprose I have just launch a local docker image

docker run -d -p 8080:8080 -p 55555:55555 -p:8008:8008 -p:1883:1883 -p:8000:8000 -p:5672:5672 -p:9000:9000 -p:2222:2222 --shm-size=2g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace solace/solace-pubsub-standard

Tagged:

Comments

  • uherbst
    uherbst Member, Employee Posts: 127 Solace Employee

    Hi Fahmi,
    Do you connect to port 5671 or 5672 ? (your URL says: localhost:5671, but your error message and your docker command sys: 5672 ?
    What is the output of "show service" in the cli ?
    Anything interesting in the event.log ? (inside the docker container, that's /usr/sw/jail/logs/event.log)

  • Fahmi
    Fahmi Member Posts: 3

    Hello,
    The URL I used is "amqp://localhost:5672"
    (It was a mistake in the copy paste because I tested also with 5671 but got the same error)
    so the java exception is:
    org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JMS processing; nested exception is com.solacesystems.jms.ConfigurationException: Invalid scheme "amqp" in host "amqp://localhost:5672"
    Nothing special in the output logs of the container (I checked via docker logs 7a5f4c80ac1a) but I don't found a /usr/sw directory (I'm on macos) and not yet tested the client :/

  • amackenzie
    amackenzie Member, Employee Posts: 262 Solace Employee

    Solace JMS does not support AMQP endpoints. If you want to use JMS over AMQP, you would have to look at something like Qpid. I am not sure if Qpid has a Spring Cloud Stream binder. I suspect not but worth asking them if they have plans.

  • Fahmi
    Fahmi Member Posts: 3

    Oki it's clear. Thanks

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

    @amackenzie is correct, but @Fahmi keep in mind that the Solace broker does protocol translation for you so if you want to use the Spring Boot JMS Starter for one app (which sends events over SMF) and AMQP for another app not using Spring they can still exchange messages with each other.