Closed drmaciej closed 3 years ago
I think this behaviour is mostly as expected from the library's point of view. The library does not take a particular opinion on which listeners correspond to which broker (you could be using SQS, ActiveMQ, both, or a custom broker in your project). It will attempt to configure the listener expecting that you may swap out brokers using external configuration.
I would suggest that you annotation your listener with @Requires(property = SqsConfigurationProperties.PREFIX + ".enabled", value = "true")
as you suggested.
thanks @elliottpope; I'll keep using that.
I'm aware of
micronaut.jms.sqs.enabled
. I was expecting to set this tofalse
and completely disable any JMS/SQS-related functionality. Instead, the framework attempts to create listeners.Is the proper solution adding
@Requires(property = SqsConfigurationProperties.PREFIX + ".enabled", value = "true")
to listeners? Or shouldmicronaut.jms.sqs.enabled
cover that?Task List
Steps to Reproduce
@JMSListener(CONNECTION_FACTORY_BEAN_NAME)
micronaut.jms.sqs.enabled
tofalse
.Expected Behaviour
Application starts without any issue.
Actual Behaviour
Application fails to start:
Environment Information
Example Application