JAMS Messaging with NATS
The JAMS services pass messages to one another through a message broker: job submissions, completions, state changes, and definition changes. JAMS installs and manages that broker for you as a Windows service named JAMS NATS Server.
NATS replaces Microsoft Message Queuing (MSMQ). MSMQ was a Windows feature that the installer enabled. NATS is a single executable that the JAMS installer places on disk, configures, secures with TLS, and starts. You do not enable a Windows feature, create queues, or set queue permissions.
What Changed
| Earlier versions | Now | |
|---|---|---|
| Message broker | MSMQ (Windows feature) | NATS (installed by JAMS) |
| Windows feature to enable | Message Queuing | None |
| Queues to create | jamsrequests, JAMStoSCOM | None. Created automatically. |
| Port between failover nodes | 1801 | 4222 |
| Transport security | Inherited from Windows | Mutual TLS, set up during install |
| Message store | MSMQ storage | C:\ProgramData\JAMS\NATS |
A standard single-server upgrade needs no action. The installer sets up NATS, and the Scheduler moves any messages still in the old MSMQ queues onto NATS on its first start. See Upgrading from MSMQ to NATS.
- Failover (high availability) pairs must allow TCP 4222 between the two nodes, and the secondary node needs a NATS certificate issued from the shared root CA. See NATS in a Failover Environment.
- Microsoft System Center Operations Manager (SCOM) users must install the updated JAMS management pack. See SCOM Integration with NATS.
What Did Not Change
NATS replaces the transport only. It does not change how JAMS schedules or runs work.
- SQL Server is still the system of record. Jobs, Entries, Variables, and history live in the JAMS database. After a restart or a failover, the Scheduler rebuilds its schedule from the database, not from the broker.
- Failover works the same way. Which node is active is still decided in the JAMS database. NATS carries messages between the nodes. It does not pick the active node.
- Clients connect the same way. The Desktop Client, PowerShell, Web Client, and Agents still use the Scheduler listener on 5773, the JAMS Server on 773, Agents on 77, and the Executor on 277. NATS is used between JAMS services only.
- Jobs behave the same way. Schedules, triggers, dependencies, and execution are unchanged.
Two Kinds of Message
Reliable messages must not be lost. They change state: a job was submitted, an Entry completed, a Variable changed. NATS JetStream writes them to disk in the JAMS_RELIABLE stream and delivers them even if the Scheduler was stopped when they were sent. Under MSMQ these went to a transactional queue.
Transient messages are best-effort notifications: an Agent's state changed, a definition was edited, a Queue was reconfigured. They go straight to whoever is listening and are not stored.
For the full list of streams, subjects, and message types, see NATS Streams and Subjects Reference.
Performance
In internal testing, draining a backlog of messages was about 35% faster on NATS than on MSMQ, and messaging overall was 20% to 40% faster.
Where to Go Next
| To | Read |
|---|---|
| Learn about the new service and its files | The JAMS NATS Server Service |
| Open the right firewall ports | NATS Ports and Firewall Requirements |
| Change a port, logging, or the message size limit | Configuring the NATS Server |
| Understand or re-issue the TLS certificates | NATS TLS Certificates |
| Set up or repair a failover pair | NATS in a Failover Environment |
| Know what happens on upgrade | Upgrading from MSMQ to NATS |
| Keep SCOM monitoring working | SCOM Integration with NATS |
| Check that messaging is healthy | Monitoring the NATS Server |
| Inspect streams and messages | Using the NATS Admin CLI |
| Fix a problem | Troubleshooting NATS |