active-mq
プロデューサー コンシューマー モデルでバックエンドの Java コードを書いています。複数のコンシューマーが使用してテーブルの質問を更新しようとすると、次の例外が発生し、トランザクションがロールバックされます。各コンシューマ タスク内で複数のスレッドが実行されています。
WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1062, SQLState: 23000
07:10:31,609 ERROR [org.hibernate.util.JDBCExceptionReporter] Duplicate entry '69-947' for key 'PRIMARY'
07:10:31,615 ERROR [com.xminds.bestfriend.consumers.QuestionGeneration] Exception failed the Question generation
org.springframework.dao.DataIntegrityViolationException: could not insert: [com.xminds.bestfriend.frontend.model.Friendship];
誰でもこれに対する解決策を提案できます。