1
Spring Cloud Stream Rabbitで確実に配信を保証するにはどうすればいいですか?私のコードは以下のとおりです: -Spring Cloud Stream Rabbit配信確認
class Source {
MessageChannel output;
Repository repo;
@Transactional
void publisher(Command command){
repo.save(command);
output.send(MessageBuilder
.withPayload(new Event()).build());
}
}
class Sink {
@StreamListener(Event.class)
void eventListener(Event event){
// method body
}
}
助けていただければ幸いです。
ありがとうございます。メッセージが失敗した場合、プロデューサは再試行しますか? – aprofromindia
消費者側の承認モードを参照していたので、プロデューサが何を再試行しているのか分かりません。コンシューマ側で再試行を行う場合は、次のドキュメントを参照してください。http://docs.spring.io/spring-cloud-stream/docs/Chelsea.BUILD-SNAPSHOT/reference/htmlsingle/index.html#_retry_with_the_rabbitmq_binder –