Dynamically change jmsSelector

Is there a way to use a property read from a configuration file to populate the Value property in a JMS selector? As an example, I have:

@ActivationConfigProperty(propertyName = "messageSelector", propertyValue = 
JMSSelector.ITEM_SELECTOR)

Where JMSSelector.ITEM_SELECTOR is a string defined as:

public static final String ITEM_SELECTOR = "type = 'S_TYPE' OR type  = 'M_TYPE'"

Let's say that I have another new type, different from "S_TYPE" and "M_TYPE", and I have it in the configuration file

MYTYPES = S_TYPE,M_TYPE,G_TYPE

Is there a way to load it dynamically without changing my code and redeploying it?

0
source share
1 answer

, , jmsselector String . https://timjansen.imtqy.com/jarfiller/guide/jms/selectors.xhtml,

public static final String ITEM_SELECTOR = "'tipe LIKE '%_TYPE'"

, -

0

Source: https://habr.com/ru/post/1705736/


All Articles