Worked on #2317, force single consumer
This commit is contained in:
parent
feff734736
commit
aa37884b2e
|
@ -42,8 +42,6 @@ public class MdmQueueConsumerLoader {
|
||||||
private MdmMessageHandler myMdmMessageHandler;
|
private MdmMessageHandler myMdmMessageHandler;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IChannelFactory myChannelFactory;
|
private IChannelFactory myChannelFactory;
|
||||||
@Autowired
|
|
||||||
private IMdmSettings myMdmSettings;
|
|
||||||
|
|
||||||
protected IChannelReceiver myMdmChannel;
|
protected IChannelReceiver myMdmChannel;
|
||||||
|
|
||||||
|
@ -51,7 +49,10 @@ public class MdmQueueConsumerLoader {
|
||||||
public void startListeningToMdmChannel() {
|
public void startListeningToMdmChannel() {
|
||||||
if (myMdmChannel == null) {
|
if (myMdmChannel == null) {
|
||||||
ChannelConsumerSettings config = new ChannelConsumerSettings();
|
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);
|
myMdmChannel = myChannelFactory.getOrCreateReceiver(IMdmSettings.EMPI_CHANNEL_NAME, ResourceModifiedJsonMessage.class, config);
|
||||||
if (myMdmChannel == null) {
|
if (myMdmChannel == null) {
|
||||||
ourLog.error("Unable to create receiver for {}", IMdmSettings.EMPI_CHANNEL_NAME);
|
ourLog.error("Unable to create receiver for {}", IMdmSettings.EMPI_CHANNEL_NAME);
|
||||||
|
|
Loading…
Reference in New Issue