🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

Spring Cloud Stream and Solace Bindings

arda
arda Member Posts: 5
edited November 2019 in Connectors & Integrations #1

I am trying to use Spring Cloud Stream bindings with spring-cloud-starter-stream-solace but encountering issues with the set up / configuration.

I have created a durable queue Q.MYQUEUE which is mapped to a Topic /mytopic/topic1. It seems that the SolaceQueueProvisioner tries to create a new queue and gets a "Router does not support durable endpoint management." Durable queues are administered/set up by a central team. Are there any ways to use existing queues/topic subscriptions for this set up?

spring.cloud:
stream:
bindings:
input:
destination: Q.MYQUEUE
group: APP1
solace:
bindings:
input:
consumer:
queueAdditionalSubscriptions: /mytopic/topic1

org.springframework.cloud.stream.binding.BindingService: Failed to create consumer binding; retrying in 30 seconds
org.springframework.cloud.stream.provisioning.ProvisioningException: Failed to provision durable queue Q.MYQUEUE.APP1; nested exception is com.solacesystems.jcsmp.InvalidOperationException: Capability Mismatch: Router does not support durable endpoint management.
    at com.solace.spring.cloud.stream.binder.provisioning.SolaceQueueProvisioner.provisionQueue(SolaceQueueProvisioner.java:128)
    at com.solace.spring.cloud.stream.binder.provisioning.SolaceQueueProvisioner.provisionConsumerDestination(SolaceQueueProvisioner.java:105)
    at com.solace.spring.cloud.stream.binder.provisioning.SolaceQueueProvisioner.provisionConsumerDestination(SolaceQueueProvisioner.java:30)

Answers

  • swenhelge
    swenhelge Member, Employee Posts: 80 Solace Employee

    Hi,

    I think the problem is that the actual queue name that the binding uses includes the group - that's why you get this exception - it's looking for Q.MYQUEUE.APP1, can't find it an tries to provision this queue. You have created a queue called Q.MYQUEUE.
    Try creating the queue with the former name and see if the problem goes away.
    You can see how the queue name is generated in the source code in github, method getQueueName from line 64:
    https://github.com/SolaceProducts/spring-cloud-stream-binder-solace/blob/2249199aacff9e36aee1837a3bbcdfd54a749a50/spring-cloud-stream-binder-solace-core/src/main/java/com/solace/spring/cloud/stream/binder/util/SolaceProvisioningUtil.java

  • arda
    arda Member Posts: 5

    Tried that approach - did not work

  • ChristianHoltfurth
    ChristianHoltfurth Member, Employee Posts: 75 Solace Employee

    Hi Arda,
    It sounds like your code is trying to provision the queue, because you likely have Dynamic Durables Enabled. See: https://docs.solace.com/Solace-JMS-API/Message-Transport-Modes.htm#Guaranteed
    If you are using JNDI, you should be able to disable dynamic-durables in the connection factory, which will then tell your client to not try to create the queue on the broker when the Session.createDurableSubscriber() or Session.createQueue() is called. Please see https://docs.solace.com/Solace-JMS-API/API-Properties.htm#jms_properties_39190069_304368 for more info.

  • amackenzie
    amackenzie Member, Employee Posts: 269 Solace Employee

    Hi @arda I am with the Product Management team at Solace.
    In it's current form, the Spring Cloud Stream binders require the create dynamic durables permission as it will always attempt to create the queue.
    We are looking at modifying the binder to allow it to attempt the create and "ignore" failure. This would then assume that the queue has been created administratively and exists.
    We are currently examining the short term roadmap for the SCS binders and this would be an important feature for us to address but I cannot give you a time frame right now where this change would be implemented.
    Being open source, we would happily entertain a pull request if you had the desire to implement this yourself, otherwise, I will update this thread when we are scheduled to deliver this feature.

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

    Hi @arda,
    I just wanted to update you and anyone that finds this thread that the latest version of the Solace Spring Cloud Stream Binder now allows for you to disable queue provisioning so you can use it with pre-provisioned queues.

    There are three new properties that you can set to false to disable provisioning. You can find more info here.
    The properties are:
    1. provisionDurableQueue
    2. provisionSubscriptionsToDurableQueue
    3. provisionDmq

    Happy Streaming!