クラス MongoDbChannelMessageStore

実装されたすべてのインターフェース:
IterableSE<MessageGroup>AwareInitializingBeanApplicationContextAwareBasicMessageGroupStoreChannelMessageStoreMessageGroupStorePriorityCapableChannelMessageStore

public class MongoDbChannelMessageStore extends AbstractConfigurableMongoDbMessageStore implements PriorityCapableChannelMessageStore
MongoDB PriorityCapableChannelMessageStore の実装。このメッセージストアは、メッセージチャネルにのみ使用されます。

priorityEnabled オプションを提供して、priority 方式でメッセージをポーリングできるようにします。

優先ドキュメントフィールドとして、IntegrationMessageHeaderAccessor.PRIORITY メッセージヘッダーが使用されます。

同じコレクションを org.springframework.integration.channel.QueueChannel と org.springframework.integration.channel.PriorityChannel に使用できますが、これらの場合には MongoDbChannelMessageStore の異なるインスタンスを使用し、最後のインスタンスは priorityEnabled = true オプションを使用する必要があります。

導入:
4.0
作成者:
Artem Bilan, Adama Sorho
  • フィールドの詳細

  • コンストラクターの詳細

  • メソッドの詳細

    • setPriorityEnabled

      public void setPriorityEnabled(boolean priorityEnabled)
    • isPriorityEnabled

      public boolean isPriorityEnabled()
      次で指定:
      インターフェース PriorityCapableChannelMessageStoreisPriorityEnabled 
      戻り値:
      このチャネルメッセージストアでメッセージ優先度が有効になっている場合は true。
    • createIndexes

      protected void createIndexes()
      オーバーライド:
      クラス AbstractConfigurableMongoDbMessageStorecreateIndexes 
    • addMessageToGroup

      public MessageGroup addMessageToGroup(ObjectSE groupId, Message<?> message)
      インターフェースからコピーされた説明: BasicMessageGroupStore
      グループ ID に関連付けてメッセージを保存します。これは、メッセージをグループ化するために使用できます。
      次で指定:
      インターフェース BasicMessageGroupStoreaddMessageToGroup 
      オーバーライド:
      クラス AbstractMessageGroupStoreaddMessageToGroup 
      パラメーター:
      groupId - メッセージを保存するグループ ID。
      message - メッセージ。
      戻り値:
      メッセージグループ。
    • getMessageGroup

      public MessageGroup getMessageGroup(ObjectSE groupId)
      完全には使用されていません。指定されたグループ ID のみをラップします。
      次で指定:
      インターフェース BasicMessageGroupStoregetMessageGroup 
      パラメーター:
      groupId - グループ識別子。
      戻り値:
      メッセージのグループ。このキーにメッセージが存在しない場合は空です。
    • pollMessageFromGroup

      public Message<?> pollMessageFromGroup(ObjectSE groupId)
      インターフェースからコピーされた説明: BasicMessageGroupStore
      この MessageGroup からのメッセージのポーリング(実装でサポートされている場合は FIFO スタイル)と同時に、ポーリングされた Message も削除します。
      次で指定:
      インターフェース BasicMessageGroupStorepollMessageFromGroup 
      パラメーター:
      groupId - グループ識別子。
      戻り値:
      メッセージ。