I am very confused. I thought it was pretty easy to create a service endpoint in Neuron that could take in calls for a REST service and act as a pass-through (redirect) layer passing that call on to the real endpoint. Here is what I have done.
1) Create a service endpoint.
2) Enabled binding as REST
3) Binding tab is request-reply
4) Client connector is set as publisher AppWebAPI, publish to topic PM.Data, URL is http://esb-myapi.com (no IIS listening here)
5) Service connector is set to subscriber Id PM.API (PM.API is set to subscribe to PM.Data topic), URL is http://esb-myapi.com (IIS listening here)
Everything else is default. Issue is when my app issues the REST GET call to the http://esb-myapi.com endpoint Neuron gets it and AppWebAPI sends a request over and over and over again... goes on until I stop Neuron. I nver see PM.API ever receive the message.
If I switch the URLs around I see a normal send, receive, reply pattern but the reply is a 404 because IIS is not listening on that endpoint.
Is this suppose to work? What is wrong?
UPDATE:
From what I can tell the client connector does not care at all what the URL is. It processes every request that comes to the box. I can put www.bing.com as the URL and event though I am sending a request to esb-myapi.com it still picks it up. It also means that when it publish the message again to api.myapi.com which is on the same box it just picks the same message up and again and republishes, again and again. Looks like I can't put a filter on the publisher or subscriber either as the key request URL fields are not accessible (at least not without custom code and pipelines). Not sure how you ever get this working on a local machine.
Tags:
Hi Todd..
I saw your support ticket. I will provide a response there.
John Petersen
Hi Todd,
I think you have a misunderstanding of how client connectors and service connectors work. Client Connectors (i.e. the info you fill out on the Client Connector tab) represents services hosted by the Neuron ESB runtime. When you provide it a URL, the URL MUST reference the local Neuron ESB server that will be hosting and running the Neuron ESB configuration. For example, if your server name is "Neuron01", the url would have to be http://neuron01/.....
generally you would provide a port as well if anything else (like IIS ) is listening/runnning on the neuron server.
In contrast, service connectors (the info you fill out on the Service Connector Tab) represents service endpoints that already exist and are hosted somewhere in your environment.....this could be on the same machine as Neuron...or a remote machine. In some interesting use cases...it could represent the url of our own client connector....but no need to think about that now :)
So to create a pass thru REST you can either create one service endpoint and fill out both the Client Connector and Service Connector tabs...or you can create 2 Service Endpoints...one with a Client Connector tab enabled...the other with The service connector tab enabled. in both cases though, the URLs would be different, where the client connector tab url will represent the Neuron server hosted service, while the service connector tab will represent the service url that you want the incoming message passed on to.
I would strongly recommend that you go through the Neuron Web Services tutorial that you can find here:
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by