mule - Why won't a REST component not receive a call made internal to an app when multiple Global HTTP Connectors are Configured? -


i'm struggling configure , deploy cloudhub app multiple global http connectors , rest component.

my application has 2 flows: 1 polls rss feed news , posts json representation of feed http inbound endpoint in same app (endpoint resides on second flow). second flow receives post, magic, including persisting item storage, , notifies via http outbound endpoint external node.js web app push item via web sockets active clients.

i have tried feels dozens of different configurations involving variety of http global connectors , http in , outbound endpoints, can't work. have:

  1. a polling http connector
    • an http endpoint referencing above polling http connector rss feed
  2. one global connector (we'll call http_one) receive messages @ localhost:${http.port}
    • an http oubound endpoint configured referencing http_one , configured post activity /api/v1/activity
    • an http inbound endpoint configured receive messages /api/v1 , jersey controller sitting behind endpoint takes /activity.
  3. another global connector (http_two) external host set proxy host name (e.g. somehost.somewhere.com).
    • an http outbound endpoint configured post messages somehost.somewhere.com

on localhost, i've had use various properties allow of activity on multiple ports on laptop.

on cloudhub, i'm using localhost , ${http.port} everywhere except in oubound endpoint calls external web service.

i can 1 flow or other working, not both.... problem seems posting given news item rss feed inbound http endpoint. sending post http://localhost:80/api/v1/activity, connector says no such path exists (it lists /api/v1 option), makes me think call not getting far jersey controller sits behind global connector , http inbound endpoint /api/v1/activity. behavior inherent flaw in using rest component , multiple global http connectors? also, why have reference global http connector when making outbound call? why can't use default http connector? (maybe last 2 questions should go in subsequent post...)

here's of relevant config 2 flows:

global connectors

<http:polling-connector name="pollinghttpconnector" pollingfrequency="60000" doc:name="http polling" clientsotimeout="10000" cookiespec="netscape" receivebacklog="0" receivebuffersize="0" sendbuffersize="0" serversotimeout="10000" socketsolinger="0" validateconnections="true"/> <http:connector name="edustream_http" cookiespec="netscape" validateconnections="true" sendbuffersize="0" receivebuffersize="0" receivebacklog="0" clientsotimeout="10000" serversotimeout="10000" socketsolinger="0" proxyhostname="${edustream.host}"  doc:name="http\https" proxyport="80"/> <http:connector name="edustreamesb_http" cookiespec="netscape" validateconnections="true" sendbuffersize="0" receivebuffersize="0" receivebacklog="0" clientsotimeout="10000" serversotimeout="10000" socketsolinger="0" proxyhostname="localhost" proxyport="${http.port}" doc:name="http\https"/> 

news rss feed flow

<flow name="ucdnewsconsumer" doc:name="ucdnewsconsumer">     <http:inbound-endpoint address="http://news.ucdavis.edu/xml/getnews.php/rss/category/general%20interest"          connector-ref="pollinghttpconnector" doc:name="http" exchange-pattern="one-way"/>     <rss:feed-splitter/>     <rss:entry-last-updated-filter/>       <component class="edu.ucdavis.edustream.esb.news.rss.entryreceiver" doc:name="java"/>     <logger message="#[payload]" level="info" doc:name="logger"/>     <http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="${http.port}" path="api/v1/activity"    doc:name="http"  mimetype="application/json" connector-ref="edustreamesb_http" />     <logger message="payload is: #[payload] inbound headers:  #[headers:inbound:*] outbound headers:  #[headers:outbound:*] exception is:  #[exception]" level="info" doc:name="logger"/> </flow> 

activity publication service -- core flow

<flow name="edustreamesbflow1" doc:name="edustreamesbflow1">     <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="${http.port}" doc:name="http" contenttype="application/json" mimetype="application/json" path="api/v1" connector-ref="edustreamesb_http"/>     <jersey:resources doc:name="rest">         <component class="edu.ucdavis.edustream.esb.activity.restapi.activitycontroller"/>     </jersey:resources>     <component class="edu.ucdavis.edustream.esb.activity.restapi.jerseyresponsetransformer" doc:name="jerseyresptrans"/>      <flow-ref name="publishactivity" doc:name="publish activity"/>          </flow> <sub-flow name="publishactivity" doc:name="publishactivity">     <component doc:name="activityservice">         <spring-object bean="activityservice"/>     </component>     <logger message="#[payload] #[message]" level="info" doc:name="logger"/>     <http:outbound-endpoint exchange-pattern="request-response" host="${edustream.host}" port="80" path="api/v1/activity" mimetype="application/json" contenttype="application/json" doc:name="http" connector-ref="edustream_http"/> </sub-flow> 

i not why proxyhostname , proxyport configured on both edustream_http , edustreamesb_http connectors while http endpoints these connectors target same host/port destination address. doesn't make sense me.

are really sure need use proxies?

for edustreamesb_http answer no: you're calling cloudhub cloudhub, no need proxy.

for edustreamesb_http, maybe... still seems strange.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -