User Tools

Site Tools


Action disabled: register
data_core:msmqeventsourcesink

MSMQ Event Source/Sink

Overview

Data Core can read and write Alarm & Event (A&E) data from Microsoft message queues. This can be used for temporary data caching when configuring resilient data flows.

For example, imagine a Data Core Node is responsible for subscribing to A&E data from an ephemeral data source such as a serial printer feed, then sending it to a downstream server. Introducing an intermediate message queue will protect us from data loss if the downstream network connection is interupted.

Getting Started

1. Enable MSMQ on Windows Server

Enable Message Queuing Services via Server Features.

2. Create Queue(s)

Create a queue using Computer Management.

NB. Data Core can only communicate with private queues on the local server.

3. Queue Config

We recommend configuring transactional queues with an explicit storage capacity.

If “Authenticated” is selected and Data Core is running under a service account, then the service account must have send/receive/delete security privileges.

4. Configure an Event Sink

A Microsoft Message Queue Event Sink will write any messages arriving on an event subscription flow to a MSMQ.

The key settings are listed under Message Queue Settings. Configure these to reference your local queue with equivalent properties.

5. Configure an Event Source

A Microsoft Message Queue Event Source reads messages from the MSMQ and relays to downstream subscribers. Note that the message will only be removed from the queue if all subscribers respond with a successful acknowledgement, therefore we recommended one event sink subscription per MSMQ event source.

The key settings are listed under Message Queue Settings. Configure these to reference your local queue.

Optional Settings

Set MSMQ to use custom storage location

By default MSMQ created in system partition, use the following method to move MSMQ files to a different location.

  • Open “Computer Manager” and expand “Services and Applications”
  • Right-click on “Message Queuing” mouse over “All Task” then click “Take Message Queuing Offline”
    Click “Yes”
  • Use xcopy command to copy MSMQ directory to different volume.
    Xcopy c:\windows\system32\msmq d:\msmq /O/X/E/H/K
    This copies contents and security settings.

After copying to new location.

  • Right click on “Message queuing” and click on “Properties”
  • Click on the “Storage” tab
  • Change the folder locations and select new location.
  • Click “OK” and a prompt will appear to reboot the system.
  • Reboot the system for the changes to take effect.
  • Open “Computer Manager” and expand “Services and Applications”
  • Right click on “Message Queuing” mouse over “All Task” then click “Bring Message Queuing Online”

Further Notes

data_core/msmqeventsourcesink.txt · Last modified: 2022/09/21 11:01 by su