Allow overriding message broker ChannelSettings in MDM (#6497)
* Add support for disabling prefixChannelName to message broker ChannelSettings * Add support for disabling ChannelNamePrefix to message broker ChannelSettings - method names update * Added support for overriding message broker channel settings for MDM message processing * Added support for overriding message broker channel settings for MDM message processing
This commit is contained in:
parent
2d740f8d85
commit
fe3baa2bb0
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
type: add
|
||||
issue: 6496
|
||||
title: "Added support for overriding message broker channel settings for MDM message processing."
|
|
@ -55,9 +55,13 @@ public class MdmQueueConsumerLoader {
|
|||
startListeningToMdmChannel();
|
||||
}
|
||||
|
||||
protected ChannelConsumerSettings getChannelConsumerSettings() {
|
||||
return new ChannelConsumerSettings();
|
||||
}
|
||||
|
||||
private void startListeningToMdmChannel() {
|
||||
if (myMdmChannel == null) {
|
||||
ChannelConsumerSettings config = new ChannelConsumerSettings();
|
||||
ChannelConsumerSettings config = getChannelConsumerSettings();
|
||||
|
||||
config.setConcurrentConsumers(myMdmSettings.getConcurrentConsumers());
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ public class MdmConsumerConfig {
|
|||
}
|
||||
|
||||
@Bean
|
||||
MdmQueueConsumerLoader mdmQueueConsumerLoader(
|
||||
public MdmQueueConsumerLoader mdmQueueConsumerLoader(
|
||||
IChannelFactory theChannelFactory, IMdmSettings theMdmSettings, MdmMessageHandler theMdmMessageHandler) {
|
||||
return new MdmQueueConsumerLoader(theChannelFactory, theMdmSettings, theMdmMessageHandler);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class MdmConsumerConfig {
|
|||
}
|
||||
|
||||
@Bean
|
||||
MdmSubscriptionLoader mdmSubscriptionLoader() {
|
||||
public MdmSubscriptionLoader mdmSubscriptionLoader() {
|
||||
return new MdmSubscriptionLoader();
|
||||
}
|
||||
|
||||
|
|
|
@ -131,6 +131,10 @@ public class MdmSubscriptionLoader {
|
|||
mySubscriptionTopicDao.update(theSubscriptionTopic, SystemRequestDetails.forAllPartitions());
|
||||
}
|
||||
|
||||
protected ChannelProducerSettings getChannelProducerSettings() {
|
||||
return new ChannelProducerSettings();
|
||||
}
|
||||
|
||||
private org.hl7.fhir.dstu3.model.Subscription buildMdmSubscriptionDstu3(String theId, String theCriteria) {
|
||||
org.hl7.fhir.dstu3.model.Subscription retval = new org.hl7.fhir.dstu3.model.Subscription();
|
||||
retval.setId(theId);
|
||||
|
@ -147,7 +151,7 @@ public class MdmSubscriptionLoader {
|
|||
org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelComponent channel = retval.getChannel();
|
||||
channel.setType(org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelType.MESSAGE);
|
||||
channel.setEndpoint("channel:"
|
||||
+ myChannelNamer.getChannelName(IMdmSettings.EMPI_CHANNEL_NAME, new ChannelProducerSettings()));
|
||||
+ myChannelNamer.getChannelName(IMdmSettings.EMPI_CHANNEL_NAME, getChannelProducerSettings()));
|
||||
channel.setPayload(Constants.CT_JSON);
|
||||
return retval;
|
||||
}
|
||||
|
@ -168,7 +172,7 @@ public class MdmSubscriptionLoader {
|
|||
Subscription.SubscriptionChannelComponent channel = retval.getChannel();
|
||||
channel.setType(Subscription.SubscriptionChannelType.MESSAGE);
|
||||
channel.setEndpoint("channel:"
|
||||
+ myChannelNamer.getChannelName(IMdmSettings.EMPI_CHANNEL_NAME, new ChannelProducerSettings()));
|
||||
+ myChannelNamer.getChannelName(IMdmSettings.EMPI_CHANNEL_NAME, getChannelProducerSettings()));
|
||||
channel.setPayload(Constants.CT_JSON);
|
||||
return retval;
|
||||
}
|
||||
|
@ -216,7 +220,7 @@ public class MdmSubscriptionLoader {
|
|||
.setSystem(CanonicalSubscriptionChannelType.MESSAGE.getSystem()));
|
||||
|
||||
subscription.setEndpoint("channel:"
|
||||
+ myChannelNamer.getChannelName(IMdmSettings.EMPI_CHANNEL_NAME, new ChannelProducerSettings()));
|
||||
+ myChannelNamer.getChannelName(IMdmSettings.EMPI_CHANNEL_NAME, getChannelProducerSettings()));
|
||||
subscription.setContentType(Constants.CT_JSON);
|
||||
|
||||
return Collections.singletonList(subscription);
|
||||
|
|
|
@ -82,8 +82,12 @@ public class MdmChannelSubmitterSvcImpl implements IMdmChannelSubmitterSvc {
|
|||
myChannelFactory = theIChannelFactory;
|
||||
}
|
||||
|
||||
protected ChannelProducerSettings getChannelProducerSettings() {
|
||||
return new ChannelProducerSettings();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
ChannelProducerSettings channelSettings = new ChannelProducerSettings();
|
||||
ChannelProducerSettings channelSettings = getChannelProducerSettings();
|
||||
myMdmChannelProducer = myChannelFactory.getOrCreateProducer(
|
||||
EMPI_CHANNEL_NAME, ResourceModifiedJsonMessage.class, channelSettings);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue