Asking help from this community after coming through several articles and sites. Didn’t find solution
I want to connect and use manually created queue, but it is not working. refer the below properties and error i am getting.
Any recommendations?
Details
Spring Boot Applicaiton created using start.spring.ip with the dependencies pubsub+, solace and Web modules
Using spring cloud stream framework
Created a queue using the solace admin console
Hi @nbommidi,
Can you post your config using ``` before and after so it puts it into a code blocK? It’s hard to make out how it is. I assume there are some angle brackets in there that are getting lost.
Also if you’re creating the queue and applying the subscriptions ahead of time you can set these properties to tell the binder not to. Find out more info on them in the Solace Consumer Properties docs section.
provisionDurableQueue = false
provisionSubscriptionsToDurableQueue = false
provisionErrorQueue = false (if you’re using the error queue)
Hi @marc
I have used denotation to represent the values. looks like they are lost
See below updatd config
spring.cloud.stream.function.definition= testConsumer
spring.cloud.stream.binder=solace
spring.cloud.stream.bindings.testConsumer-in-0.destination= preconfigured queue name
spring.cloud.stream.bindings.testConsumer-in-0.group= testConsumerGroup
spring.cloud.stream.solace.bindings.testConsumer-in-0.consumer.autoBindDmq=true
spring.cloud.stream.solace.bindings.testConsumer-in-0.consumer.provisionDurableQueue=false
spring.cloud.stream.solace.bindings.testConsumer-in-0.consumer.provisionSubscriptionsToDurableQueue=false
spring.cloud.stream.bindings.testConsumer-in-0.consumer.concurrency=3
spring.cloud.stream.binders.solace.type=solace
spring.cloud.stream.binders.solace.environment.solace.java.host= host name
spring.cloud.stream.binders.solace.environment.solace.java.msgVpn= vpn name
spring.cloud.stream.binders.solace.environment.solace.java.clientUsername= user name
spring.cloud.stream.binders.solace.environment.solace.java.clientPassword= password
Below is the part of the error log where it is trying to create a durable queue and failing due to a permission issue with a 403 error. my org didn’t allow an application to create a queue.
c.s.s.c.s.b.p.SolaceQueueProvisioner : Creating durable queue scst/wk/ for consumer group
c.s.jcsmp.impl.SessionModeSupport : (Client name:
Hi @nbommidi,
Your configuration looks close to correct to me so a few things to check:
What version of the cloud stream binder are you using? If using the latest you’ll want to use autoBindErrorQueue instead of autoBindDmq
Since you are using that feature you’ll also want to add provisionErrorQueue: false
If the disabling of provisioning is being properly read by the binder you should see logs that look something like this:
Creating durable queue scst/wk/SINK/plain/TEMPS.Q for consumer group SINK
Durable queue provisioning is disabled, scst/wk/SINK/plain/TEMPS.Q will not be provisioned nor will its configuration be validated
Note that this worked for me using the cloud-streams-sink sample in this repo with this config:
spring:
cloud:
function:
definition: sink
stream:
bindings:
sink-in-0:
destination: TEMPS.Q
#The presence of "group" tells the binder to follow the "consumer group" pattern
group: SINK
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: sensor/temperature/>
autoBindErrorQueue: true
provisionDurableQueue: false
provisionSubscriptionsToDurableQueue: false
provisionErrorQueue: false
Hey @marc, I did see that disable note when I tried several options earlier. I used to get an invalid queue or permission issue. But now I did further analysis of all my properties in earlier trials as well.
The problem was that our predefined queue didn’t accept any prefix in the queue name, but the spring cloud binder configuration automatically add the prefix with all defaults and it resulted in an invalid queue.
I have observed the group name and familiarity name is removed from the prefix, but the encoding isn’t removed.
So I did a code review of the source code and realized that there is a typo in the property. The actual property should be useDestinationEncodingInQueueName
Now I am able to fix the invalid queue issue.
You may have to advise your team to correct the documentation. Sorry, I didn’t set it up to fix it.
Hi, Not sure sure any one is getting the same error now, but I am getting it now.
I am using <solace-spring-cloud.version>2.1.0</solace-spring-cloud.version> and the following is my config
spring:
cloud:
function:
definition: consumeMessage
stream:
bindings:
consumeMessage-in-0:
destination: test
group: queue.dev
solace:
bindings:
consumeMessage-in-0:
consumer:
queueAdditionalSubscriptions: test/dev
autoBindErrorQueue: true
provisionDurableQueue: false
provisionSubscriptionsToDurableQueue: false
provisionErrorQueue: false
I have already created a user defined non-exclusive queue from sol admin with the name test.queue.dev
I am getting the following error
c.s.s.c.s.b.p.SolaceQueueProvisioner : Creating durable queue scst/wk/queue.dev/plain/test for consumer group queue.dev
c.s.s.c.s.b.p.SolaceQueueProvisioner : Durable queue provisioning is disabled, scst/wk/queue.dev/plain/test will not be provisioned nor will its configuration be validated
c.s.s.c.s.b.p.SolaceQueueProvisioner : Testing consumer flow connection to queue scst/wk/queue.dev/plain/test (will not start it)
c.s.s.c.s.b.p.SolaceQueueProvisioner : Failed to connect test consumer flow to queue scst/wk/queue.dev/plain/test. Provisioning is disabled, queue was not provisioned nor was its configuration validated.
com.solacesystems.jcsmp.JCSMPErrorResponseException: 503: Unknown Queue
at com.solacesystems.jcsmp.impl.flow.BindRequestTask.execute(BindRequestTask.java:204) ~[sol-jcsmp-10.10.0.jar:na]
Glad you figured it out @smpapas! Looking at the config I’m guessing it was that you needed to define a group on the consumeMessage-in-0 binding instead of the testConsumer-in-0 one?
I am getting the same error when trying to connect to my local Solace with preset Queue and Topic with Spring Boot application using JMS:
solace:
jms:
host: tcp://localhost:55555
msgVpn: myVpn
clientUsername: my_client
clientPassword: default #password
# dynamically create the queue if the matching queue name doesn’t exist in the message broker:
apiProperties:
Solace_JMS_DynamicDurables: true
# JMS Application environment/config property:
# Consume messages from a topic rather than from a queue
pub-sub-domain: true
10:24:01.937 [DefaultMessageListenerContainer-11] DEBUG com.solacesystems.jms.SolSession - Client-12:jmsSession-11: Entering createConsumer(). Destination: T/myTopic messageSelector: null NoLocal: false
10:24:01.937 [DefaultMessageListenerContainer-11] DEBUG c.s.jms.SolMessageConsumer - SolMessageConsumer created. Destination: T/myTopic messageSelector: null noLocal: false state: Started durable: false
10:24:01.937 [DefaultMessageListenerContainer-11] DEBUG c.s.jms.impl.ConsumerFactory - Creating non durable consumer for topic T/myTopic endpoint: direct: false
10:24:01.941 [Context_13_ReactorThread] INFO c.s.jcsmp.impl.flow.BindRequestTask - Client-12: Got BIND (‘’) Error Response (403) - Permission Not Allowed
I guess I need more parameters here as mentioned in the above posts, but I cannot find any example/documentation that outlines Spring application properties suitable for Solace JMS.
show client-username my_client detail
Total Client Usernames : 5 of 102
Configured : 5
Dynamic : 0
Username : my_client
Message VPN : myVpn
Enabled : Yes
Permission Override : No
Client Profile : my_cp
ACL Profile : my_acl
Authorization Group :
Dynamically configured : No
Password Configured : Yes
Subscription Manager : No
Clients : 1
Service SMF : 1
Service Web Transport : 0
Max Connections : 100
Service SMF : 100
Service Web Transport : 100
Hi @azakovorotny ,
Your issue will be different than the others referred to in this thread as the initial poster was using the Spring Cloud Stream binder which does NOT use JMS.
Given your error it looks like your client-username doesn’t have permission to create the endpoint. Can you check your “my_cp” client-profile and see if it has “Allow Client to Create Endpoints” set to true?
If it’s already set to true please go ahead and create a separate discussion in the forum to avoid confusion for others that find this thread in the future.
Hope that helps!