308.5. コンシューマーの使用
308.5.1. 永続共有サブスクリプション
1 人以上のコンシューマー間で共有できる永続的なサブスクリプションを作成する場合、JMS 2.0 準拠の接続ファクトリーを使用して、共通の subscriptionId を指定します。次に、サブスクリプションプロパティーの耐久性と共有を true に設定します。
from("sjms2:topic:foo?consumerCount=3&subscriptionId=bar&durable=true&shared=true") .to("mock:result"); from("sjms2:topic:foo?consumerCount=2&subscriptionId=bar&durable=true&shared=true") .to("mock:result");
308.5.2. InOnly コンシューマー - (デフォルト)
InOnly コンシューマーは、SJMS2 コンシューマーエンドポイントのデフォルトの Exchange 動作です。
from("sjms2:queue:bar") .to("mock:result");
308.5.3. InOut コンシューマー
InOut 動作を有効にするには、exchangePattern
属性を URI に追加します。
from("sjms2:queue:in.out.test?exchangePattern=InOut") .transform(constant("Bye Camel"));