Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.このコンテンツは選択した言語では利用できません。
A.8. Resequencer
Overview リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
The resequencer pattern, shown in Figure A.5, “Resequencer Pattern”, enables you to resequence messages according to the sequence number stored in an NMR property. The ServiceMix EIP resequencer pattern maps to the Apache Camel resequencer configured with the stream resequencing algorithm.
Figure A.5. Resequencer Pattern
Sequence number property リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
The sequence of messages emitted from the resequencer is determined by the value of the sequence number property: messages with a low sequence number are emitted first and messages with a higher number are emitted later. By default, the sequence number is read from the
org.apache.servicemix.eip.sequence.number
property in ServiceMix, but you can customize the name of this property using the eip:default-comparator
element in ServiceMix.
The equivalent concept in Apache Camel is a sequencing expression, which can be any message-dependent expression. When migrating from ServiceMix EIP, you normally define an expression that extracts the sequence number from a header (a Apache Camel header is equivalent to an NMR message property). For example, to extract a sequence number from a
seqnum
header, you can use the simple expression, header.seqnum
.
Example ServiceMix EIP route リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
Example A.13, “ServiceMix EIP Resequncer” shows how to define a resequencer using the ServiceMix EIP component.
Example A.13. ServiceMix EIP Resequncer
Equivalent Apache Camel XML route リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
Example A.14, “Apache Camel Resequencer Using XML” shows how to define an equivalent route using Apache Camel XML configuration.
Example A.14. Apache Camel Resequencer Using XML
Equivalent Apache Camel Java DSL route リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
Example A.15, “Apache Camel Resequencer Using Java DSL” shows how to define an equivalent route using the Apache Camel Java DSL.
Example A.15. Apache Camel Resequencer Using Java DSL
from("jbi:endpoint:sample:Resequencer:ResequencerEndpoint"). resequencer(header("seqnum")). stream(new StreamResequencerConfig(100, 2000L)). to("jbi:service:sample:SampleTarget");
from("jbi:endpoint:sample:Resequencer:ResequencerEndpoint").
resequencer(header("seqnum")).
stream(new StreamResequencerConfig(100, 2000L)).
to("jbi:service:sample:SampleTarget");