Red Hat Certified Specialist in Cloud-native Integration 試験
最新更新時間: 2026/09/21
【秋学習応援セール|10月限定キャンペーン】:EX221 最新真題を買う時、日本語版と英語版両方を同時に獲得できます。
実際の問題集を練習し、試験のポイントを了解し、テストに申し込むするかどうかを決めることができます。
さらに試験準備時間の35%を節約するには、EX221 問題集を使用してください。
Question No : 1
Log wire-tapped messages into a file while continuing the main flow to an HTTP endpoint.
正解:
Explanation:
from("direct:input")
.wireTap("file:/tmp/audit")
.to("http://localhost:8080/service");
Question No : 2
Create a route that sends a copy of the message to a wire-tap endpoint without affecting the main flow.
正解:
Explanation:
from("direct:start")
.wireTap("log:tap")
.to("log:main");
Question No : 3
Use XML DSL to route messages to different endpoints based on a header priority.
正解:
Explanation:
<route>
<from uri="direct:start"/>
<choice>
<when>
<simple>${header.priority} == 'high'</simple>
<to uri="log:high"/>
</when>
<otherwise>
<to uri="log:normal"/>
</otherwise>
</choice>
</route>
Question No : 4
Convert CSV to JSON using custom logic and write to file.
正解:
Explanation:
from("file:/input/data.csv?noop=true")
.split(body().tokenize("
"))
.process(exchange -> {
String[] cols = exchange.getIn().getBody(String.class).split(",");
String json = "{\ "col1\ ":\ "" + cols[0] + "\ ", \ "col2\ ":\ "" + cols[1] + "\ "}"; exchange.getMessage().setBody(json);
})
.to("file:/output/json?fileName=converted.json&fileExist=Append"); question: 01
Implement content-based routing in Java DSL to route messages with header type=csv to a CSV processor, otherwise to a default logger.
Question No : 5
Validate XML against an XSD schema using Camel Validator component.
正解:
Explanation:
from("file:/input/xml?noop=true")
.to("validator:/schemas/order.xsd")
.to("log:validatedXml");
Question No : 6
Filter JSON files containing the key "urgent": true and route them to a separate log.
正解:
Explanation:
from("file:/input/json?noop=true")
.unmarshal().json(JsonLibrary.Jackson, Map.class)
.filter(simple("${body[urgent]} == true"))
.to("log:urgentJson");
Question No : 7
Create a route that moves all processed XML files to .done directory.
正解:
Explanation:
from("file:/input/xml?move=.done")
.to("log:processed");
Question No : 8
Read a JSON array from file and aggregate the data using a custom processor.
正解:
Explanation:
from("file:/input/data.json?noop=true")
.unmarshal().json(JsonLibrary.Jackson, List.class)
.process(exchange -> {
List<Map<String, Object>> items = exchange.getIn().getBody(List.class); int sum = items.stream().mapToInt(e -> (int) e.get("amount")).sum(); exchange.getMessage().setBody("Total: " + sum);
})
.to("log:sum");
Question No : 9
Produce a CSV file from POJO using Bindy.
正解:
Explanation:
from("direct:pojos")
.marshal().bindy(BindyType.Csv, MyPojo.class)
.to("file:/output/csv?fileName=records.csv");
Question No : 10
Extract specific fields from a CSV file and build a new JSON object manually.
正解:
Explanation:
from("file:/input.csv?noop=true")
.split(body().tokenize("
"))
.process(exchange -> {
String[] parts = exchange.getIn().getBody(String.class).split(",");
String json = "{\ "id\ ":\ "" + parts[0] + "\ ", \ "item\ ":\ "" + parts[1] + "\ "}"; exchange.getMessage().setBody(json);
})
.to("log:csvAsJson");
Question No : 11
Consume XML, transform it to JSON, and log output.
正解:
Explanation:
from("file:/input/xml?noop=true")
.unmarshal().jacksonxml(Map.class)
.marshal().json(JsonLibrary.Jackson)
.to("log:xmlToJson");
Question No : 12
Read a CSV file, convert to XML, and store it in /output/xml.
正解:
Explanation:
from("file:/input/csv?noop=true")
.unmarshal().bindy(BindyType.Csv, MyCsvClass.class)
.marshal().jaxb("com.example")
.to("file:/output/xml?fileName=converted.xml");
Question No : 13
Consume a JSON file and route based on a field value ("status" == "approved").
正解:
Explanation:
from("file:/input/json?noop=true")
.unmarshal().json(JsonLibrary.Jackson, Map.class)
.choice()
.when(simple("${body[status]} == 'approved'"))
.to("log:approved")
.otherwise()
.to("log:rejected");
Question No : 14
Produce an XML file using JAXB from a Java object.
正解:
Explanation:
from("direct:toXml")
.marshal().jaxb("com.example")
.to("file:/output/xml?fileName=order.xml");
Question No : 15
Create a route that converts an XML file into Java object using JAXB.
正解:
Explanation: