IT認証試験問題集
GOWUKAKU|IT認定資格の最新の試験問題集(PDF版・無料サンプル問題)を提供しています
 ホームページ / RedHat 問題集 / EX221 問題集  / EX221 問題練習

RedHat EX221 問題練習

Red Hat Certified Specialist in Cloud-native Integration 試験

最終更新日: 2026/10/17  収録内容確認済 | PDF問題集: 全 136 問収録

【仕様案内】:EX221 問題集(PDF版)は日本語版&英語版の2言語セットに対応しております(日本語版が準備中の科目は英語版を即時ダウンロードのうえ、日本語版は準備完了次第ご登録メールへ自動送付いたします)。

本ページでは問題集の無料サンプル問題を公開しており、出題形式や現在の理解度を確認することができます。

全136問を収録したPDF版は、EX221 問題集からご確認いただけます。

 / 6

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:

 / 6