From aa37884b2e2dfd5f2519d70d21dc52fc0c9fb169 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 25 Jan 2021 09:51:50 -0500 Subject: [PATCH] Worked on #2317, force single consumer --- .../ca/uhn/fhir/jpa/mdm/broker/MdmQueueConsumerLoader.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmQueueConsumerLoader.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmQueueConsumerLoader.java index 4616e88752c..18f5b873d15 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmQueueConsumerLoader.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/broker/MdmQueueConsumerLoader.java @@ -42,8 +42,6 @@ public class MdmQueueConsumerLoader { private MdmMessageHandler myMdmMessageHandler; @Autowired private IChannelFactory myChannelFactory; - @Autowired - private IMdmSettings myMdmSettings; protected IChannelReceiver myMdmChannel; @@ -51,7 +49,10 @@ public class MdmQueueConsumerLoader { public void startListeningToMdmChannel() { if (myMdmChannel == null) { ChannelConsumerSettings config = new ChannelConsumerSettings(); - config.setConcurrentConsumers(myMdmSettings.getConcurrentConsumers()); + + //All MDM must be done single-threaded + config.setConcurrentConsumers(1); + myMdmChannel = myChannelFactory.getOrCreateReceiver(IMdmSettings.EMPI_CHANNEL_NAME, ResourceModifiedJsonMessage.class, config); if (myMdmChannel == null) { ourLog.error("Unable to create receiver for {}", IMdmSettings.EMPI_CHANNEL_NAME);