(Receiving side) launch project coded like following.
(Sending side ) another process requests "WhoIsThereRequest " through ExecuteRequest().
Receiving side respond to the request, and Sending side receives the response.
But, one more time sending side perform same request, no response returned.
From monitoring receiving side, OnRequestReceived event is not triggered (set breakpoint on head of event, not triggered).
Message can receive only 1 time in receiving side.
What is mistaken?
namespace WindowsFormsApp1 {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
GoListener();
}
private static AmqpCFXEndpoint thisEndpoint;
private const string strCfxHandle = "CFX.TEST.MACHINE";
private const string strRequestUri = "amqp://127.0.0.1:8230";
private void GoListener() {
thisEndpoint = new AmqpCFXEndpoint();
thisEndpoint.OnRequestReceived -= OnRequestReceivedFunc;
thisEndpoint.OnRequestReceived += OnRequestReceivedFunc;
thisEndpoint.Open(strCfxHandle, new Uri(strRequestUri));
}
private CFXEnvelope OnRequestReceivedFunc(CFXEnvelope message) {
CFXEnvelope result = null;
if (message.MessageBody is WhoIsThereRequest ) {
result = CFXEnvelope.FromCFXMessage(new WhoIsThereResponse() {
CFXHandle = strCfxHandle,
RequestNetworkUri = strRequestUri,
RequestTargetAddress = ""
});
} else {
return result;
}
result.Source = strCfxHandle;
result.Target = strCfxHandle;
result.TimeStamp = DateTime.Now;
return result;
}
}
}
(Receiving side) launch project coded like following.
(Sending side ) another process requests "WhoIsThereRequest " through ExecuteRequest().
Receiving side respond to the request, and Sending side receives the response.
But, one more time sending side perform same request, no response returned.
From monitoring receiving side, OnRequestReceived event is not triggered (set breakpoint on head of event, not triggered).
Message can receive only 1 time in receiving side.
What is mistaken?