🎄 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.

concurrent connection

Does anyone have idea about below error while trying to enable concurrent connection ?.. am i doing wrong in format what i put in values.

Config:-
solace.jms.message.consumer.concurrency.value=1-2
code:-
listenerFactory.setConcurrency("${solace.jms.message.consumer.concurrency.value}");

Error:-
java.lang.IllegalArgumentException: Invalid concurrency value [${solace.jms.message.consumer.concurrency.value}]: only single maximum integer (e.g. "5") and minimum-maximum combo (e.g. "3-5") supported.

Answers

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

    Hi @maniv,
    It doesn't look like the value from the config is being properly read in which is why the invalid concurrency value in the exception reads the same as the configuration property name.

    Try reading in your property like this and then using the concurrency variable in your setter.
    @Value("${solace.jms.message.consumer.concurrency.value}")
    private String concurrency;

    Spring offers several ways to read in your properties, this article has a few more options:
    http://www.appsdeveloperblog.com/reading-application-properties-spring-boot/

    Hope that helps!

  • rdesoju
    rdesoju Member Posts: 66

    Have you tried enclosing 1-2 in double quotes?

  • maniv
    maniv Member Posts: 10

    @marc reading property values are correct and verified it.

  • maniv
    maniv Member Posts: 10

    @rdesoju .. tried it :).. but no luck