简体   繁体   中英

Camel SEDA queue messages before sending Spring

I am sending messages after processing via EMS using Camel. I have something like the following in Spring:

<route>
    <from uri="startMessage"/>
    <to uri="processMessage"/>
    <to uri="sendMessage"/>
</route>
<--! More routes below -->

The problem is I have around 8 of these routes and I want to queue the messages before sending each via "sendMessage" on EMS.

At the moment I have:

<route>
    <from uri="startMessage"/>
    <to uri="processMessage"/>
    <to uri="seda:sendMessage"/>
</route>
<--! More routes below -->

But the "seda" part does not work as expected. The message never gets sent as it does previously.

Any suggestions for this use case would be appreciated. Thanks.

I guess you need to listen to that seda queue somewhere. The following route will enable seda staging on your first example.

<route>
    <from uri="startMessage"/>
    <to uri="processMessage"/>
    <to uri="seda:sendMessage"/>
</route>

<route>
    <from uri="seda:sendMessage"/>
    <to uri="sendMessage"/>
</route>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM