Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aa0df97

Browse files
committed
Remove throw
1 parent 1180717 commit aa0df97

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/main/java/com/example/integrationtestspringkafka/service/ConsumerService.java‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ public class ConsumerService {
2121
* Consume ExampleDTO on topic : TOPIC_EXAMPLE
2222
* Then save it in database.
2323
*
24-
* @param exampleDTO
24+
* @param exampleDTO {@link ExampleDTO}
2525
*/
2626
@KafkaListener(topics = "TOPIC_EXAMPLE", groupId = "consumer_example_dto")
27-
public void consumeExampleDTO(ExampleDTO exampleDTO) throwsException {
27+
public void consumeExampleDTO(ExampleDTO exampleDTO) {
2828
log.info("Received from topic=TOPIC_EXAMPLE ExampleDTO={}", exampleDTO);
2929
exampleRepository.save(convertToExampleEntity(exampleDTO));
30-
throw new Exception("cannot be done");
31-
// log.info("saved in database {}", exampleDTO);
30+
log.info("saved in database {}", exampleDTO);
3231
}
3332

3433
/**

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /