You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ NPM package is published as updated-node-msmq. https://www.npmjs.com/package/upd
10
10
11
11
* Support for Node.Js 6.x, 7.x, 8.x, 9.x, 10.x
12
12
* Support to push objects to the queue instead of just strings.
13
+
* Support to send messages to a queue on a **remote** machine.
13
14
14
15
## Install
15
16
@@ -32,6 +33,35 @@ var queue = msmq.openOrCreateQueue('.\\Private$\\MyAwesomeQueue');
32
33
queue.send('Hello from Node.JS!');
33
34
```
34
35
36
+
### Send a message to a remote queue
37
+
38
+
Sends a message to a remote MSMQ queue.
39
+
40
+
```js
41
+
constmsmq=require('updated-node-msmq');
42
+
43
+
// Send message to a remote queue using hostname
44
+
msmq.sendToRemoteQueue('FormatName:DIRECT=OS:mobile-000000\\private$\\privatetest', 'Hello from Node.JS!');
45
+
46
+
msmq.sendToRemoteQueue('FormatName:DIRECT=TCP:192.168.1.5\\private$\\privatetest', 'Hello again from Node.JS!');
47
+
```
48
+
49
+
#### Note:
50
+
* Creating a queue on a remote machine is not currently supported by MSMQ.
51
+
* To send messages to a remote queue, MSMQ should be enabled in the sender's machine too. Also, in the _Security_ tab of the queue on the remote machine should have the appropriate permissions set for _Everyone_ and _ANONYMOUS LOGON_.
52
+
* The queue should already be created on the remote machine.
53
+
* The format to send a message to a remote queue is as follows:
0 commit comments