Closed vsevel closed 1 year ago
like in wildfly (from https://github.com/quarkusio/quarkus/issues/30943):
@MessageDriven(name = "MyMDB", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "${Messaging.maxSession:3}"), @ActivationConfigProperty(propertyName = "destination", propertyValue = "com/x/Messaging/MyQueue"), @ActivationConfigProperty(propertyName = "rebalanceConnections", propertyValue = "true") }) @ResourceAdapter("${MyRarName}") public class MyMDB implements MessageListener { public void onMessage(Message msg) { ... } }
it is actually not very pretty, if going for a declaratif approach, ideally we would have a dedicated annotation for this adapter that has the properties as top level attributes, such as:
@ResourceEndpointJMS(destination="com/x/Messaging/MyQueue", ...)
Attributes should support parameterisation, such as: maxSession="${Messaging.maxSession:3}"
maxSession="${Messaging.maxSession:3}"
I'd prefer using MP Config for that, so you would put these in application.properties or some sort of reusable config mechanism
like in wildfly (from https://github.com/quarkusio/quarkus/issues/30943):
it is actually not very pretty, if going for a declaratif approach, ideally we would have a dedicated annotation for this adapter that has the properties as top level attributes, such as:
Attributes should support parameterisation, such as:
maxSession="${Messaging.maxSession:3}"