시험덤프
매달, 우리는 1000명 이상의 사람들이 시험 준비를 잘하고 시험을 잘 통과할 수 있도록 도와줍니다.
  / EX221 덤프  / EX221 문제 연습

RedHat EX221 시험

Red Hat Certified Specialist in Cloud-native Integration 온라인 연습

최종 업데이트 시간: 2025년08월13일

당신은 온라인 연습 문제를 통해 RedHat EX221 시험지식에 대해 자신이 어떻게 알고 있는지 파악한 후 시험 참가 신청 여부를 결정할 수 있다.

시험을 100% 합격하고 시험 준비 시간을 35% 절약하기를 바라며 EX221 덤프 (최신 실제 시험 문제)를 사용 선택하여 현재 최신 136개의 시험 문제와 답을 포함하십시오.

 / 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