[英]Camel XML config using header values in endpoint URI
我想用Spring XML camel上下文表示法編寫等效的代碼。
from("rabbitmq:resultQueue")
.filter(header("synchronousRequestId").isEqualTo(
synchronousRequestId))
.to("seda:" + synchronousRequestId).onCompletion()
.stop();
我不知道該怎么做。
.to("seda:" + synchronousRequestId)
由於syncRequestId是標頭參數,而不是String常量。
有任何想法嗎?
它的XML版本是:
<recipientList>
<simple>seda:${headers.synchronousRequestId}</simple>
</recipientList>
在Apache Camel網站的常見問題解答中找到答案
使用收件人列表EIP模式,該模式允許您使用表達式來計算動態URI。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.