Hello, hopefully someone could help us. We have a neuron machine deployed with multiple instance names. For examples sake: Instance_1, and Instance_2. We are trying to connect to Instance_2 from a process running in Instance_1 and send a message. When connecting we get a socket aborted exception.
Oddly enough we are not able to find a way to set the instance name via the API. We are on a very old version atm (3.0.3) and not able to upgrade if that makes a difference.
The exception:
Aborted: Unable to connect to the Neuron Configuration Service at servername:port. The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9995118'.
The code:
SubscriberConfiguration config = new SubscriberConfiguration()
{
ServiceAddress = "net.tcp://" + remoteMachineName + ":" + remotePort,
SubscriberId = "Test",
Zone = "Enterprise"
};
using(Party party = new Party(config))
{
party.Connect();
party.SendText("Temp.EmployeeCreated", notifyIndicativeData);
}
Tags:
This isn't a scenario that we have tested or specifically support at the moment using the Neuron API. When trying to send messages between Neuron instances, I would recommend using a client connector on Instance_2 and calling it using a service connector on Instance_1.
I apologize Michael, but I am pretty new to Neuron. Do you have any links I can read on how to do this? Send from one Neuron instance to another instance?
Tim,
Can you explain your use case for having multiple instances a bit? We generally recommend that you put any integrations that subscribe to the same data into the same instance, but there are always exceptions to the rule. If you really need to share data between instances you should use an adapter approach instead. Take a look at the socket adapter - there is a client and a server socket adapter.
Joe
I am not sure how to answer your question Joe. I was not the person who originally setup the Neuron server nor do I know who it was. So I am unsure as to their reasoning. I can only surmise that it was to keep a logical separation in the two instances as one of them deals specifically with messaging an industry standards based xml.
Long story short, we inherited these two instances and now we have a need to send data from one to the other after transforming the data into the xml I mentioned previously.
Yeah, I get that :)
Michael just told me that you guys are on 3.0.3 and cannot upgrade. Unfortunately the socket adapters are not in that release, so you'll have to either follow Michael's suggestion to use a client and service connector (if you need two-way messaging), or for one-way messaging use one of our queuing adapters like MSMQ. This way the message will be durably delivered between instances. I agree with Michael that using the Party API inside a C# step in a process to send data between instances is not a tested scenario.
Thanks Joe. We will probably switch to using msmq to send the message.
Just for my general knowledge if I was using the above code in a console application how would I specify the instance name via code? I see there is a way to set it via the appsettings, but that would limit the instance I could connect to being just that one instance would it not? If within the same console application I wanted to be able to connect to both instances it would not be possible using the API?
Or for that matter, how do you connect the Test Client to a named instance without editing the config?
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by