Simple PowerShell Example #585
Unanswered
DarioCalovic
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I've got it with the Sync example: While($True) {
[NATS.Client.Msg] $m = $sSync.NextMessage(-1);
Write-Host $m;
# Invoke PowerShell Script from config
# REPLY
$replyMsg = New-Object NATS.Client.Msg;
$replyMsg.Data = [System.Text.Encoding]::UTF8.GetBytes("reply")
$replyMsg.Subject = $m.Reply;
$c.Publish($replyMsg);
$c.Flush();
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
The timeout suggests that there is no subscriber to receive the request. How / does powershell hold onto / keep alive the subscription [object] you made or does it just go away by the next statement? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to get a simple example running on PowerShell. My gut is telling me, that i am doing something wrong with the EventHandler. All I am getting is a
Exception calling "Request" with "3" argument(s): "Timeout occurred."
. Any thoughts?PowerShell Example
C# Example
Beta Was this translation helpful? Give feedback.
All reactions