1
在以下示例中(取自Akka Camel doc),Jetty HTTP組件用於接收HTTP消息。這是否意味着演員啓動了一個新的Jetty服務器?駱駝碼頭組件如何在阿卡工作?
import akka.camel.{ CamelMessage, Consumer }
class MyEndpoint extends Consumer {
def endpointUri = "jetty:http://localhost:8877/example"
def receive = {
case msg: CamelMessage => { /* ... */ }
case _ => { /* ... */ }
}
}
謝謝。如果我有多個Jetty端點會發生什麼?它會啓動多個Jetty服務器嗎?試圖評估使用駱駝碼頭HTTP與Akka-html – EugeneMi
它應該只啓動一臺服務器,看看這個鏈接:http://camel.465427.n5.nabble.com/Using-a-single-port-for -all-Jetty-Consumers-td5736267.html –
或者,更好的是,[Jetty組件的代碼](https://github.com/apache/camel/blob/e4b2c99591f54f4d909e1e245b0c8d012c89a8c2/components/camel-jetty-common/src/main /java/org/apache/camel/component/jetty/JettyHttpComponent.java#L316),您可以在其中看到服務器僅針對不同的協議,主機名和端口組合啓動。 –