Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
None
Description
this looks like it would only process the last one
public class MessageConsumerDaemon implements Job { |
|
/** |
* logger
|
*/
|
private static final Log LOG = GrouperUtil.getLog(MessageConsumerDaemon.class); |
|
|
/** |
* @see Job#execute(JobExecutionContext)
|
*/
|
@Override |
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { |
|
Pattern pattern = Pattern.compile("^grouper\\.messaging\\.([^.]+)\\.messagingSystemName$"); |
GrouperLoaderConfig grouperLoaderConfig = GrouperLoaderConfig.retrieveConfig();
|
|
String configName = null; |
|
String actAsSubjectId = null; |
String actAsSubjectSourceId = null; |
String messagingSystemName = null; |
String queueOrTopicName = null; |
String routingKey = null; |
String exchangeType = null; |
String messageQueueType = null; |
Integer longPollingSeconds = null; |
|
for (String propertyName : grouperLoaderConfig.propertyNames()) { |
Matcher matcher = pattern.matcher(propertyName);
|
if (matcher.matches()) { |
|
|
configName = matcher.group(1); |
|
messagingSystemName = grouperLoaderConfig.propertyValueString(propertyName);
|
if (StringUtils.isBlank(messagingSystemName)) { |
LOG.info("No messaging system name found so not going to connect to any queue or topic."); |
return; |
}
|
|
queueOrTopicName = grouperLoaderConfig.propertyValueString("grouper.messaging."+configName+".queueOrTopicName"); |
routingKey = grouperLoaderConfig.propertyValueString("grouper.messaging."+configName+".routingKey"); |
exchangeType = grouperLoaderConfig.propertyValueString("grouper.messaging."+configName+".exchangeType"); |
messageQueueType = grouperLoaderConfig.propertyValueString("grouper.messaging."+configName+".messageQueueType"); |
actAsSubjectSourceId = grouperLoaderConfig.propertyValueString("grouper.messaging."+configName+".actAsSubjectSourceId"); |
actAsSubjectId = grouperLoaderConfig.propertyValueString("grouper.messaging."+configName+".actAsSubjectId"); |
longPollingSeconds = grouperLoaderConfig.propertyValueInt("grouper.messaging."+configName+".longPollingSeconds", 1); |
}
|
}
|