第127章 Spring Redis
producer と consumer がサポート対象。
このコンポーネントを使用すると、Redis からメッセージを送受信できます。Redis は、キーに文字列、ハッシュ、リスト、セット、および並べ替えられたセットを含めることができる高度なキー値ストアです。さらに、Redis はアプリ間通信のための pub/sub 機能を提供します。Camel は、コマンドを実行するためのプロデューサー、pub/sub メッセージをサブスクライブするためのコンシューマー、および重複メッセージをフィルター処理するためのべき等リポジトリーを提供します。
前提条件
このコンポーネントを使用するには、Redis サーバーが実行されている必要があります。
127.1. 依存関係 リンクのコピーリンクがクリップボードにコピーされました!
Red Hat build of Camel Spring Boot で spring-redis を使用する場合は、自動設定をサポートするために、次の Maven 依存関係を必ず使用してください。
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-redis-starter</artifactId>
</dependency>
BOM を使用してバージョンを取得します。
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.redhat.camel.springboot.platform</groupId>
<artifactId>camel-spring-boot-bom</artifactId>
<version>${camel-spring-boot-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>