JMS属性BreadcrumbId

时间:2018-08-13 07:44:04

标签: apache-camel

如何将生成的面包屑放入此属性?例如我上了这个课:

public class MyRoute extends RouteBuilder {

    @Override
    public void configure() throws Exception {

            String uuid = getContext().getUuidGenerator().generateUuid();

            from("someRoute")to("activemq:queue:someQueue");
        }
    }

我的问题是。如何将uuid用作jms属性面包屑ID?

1 个答案:

答案 0 :(得分:0)

这应该做到

@Override
public void configure() throws Exception {

        String uuid = getContext().getUuidGenerator().generateUuid();

        from("someRoute").setHeader(Exchange.BREADCRUMB_ID, simple(uuid)).to("activemq:queue:someQueue");
}