クラス AmqpInboundChannelAdapter

実装されたすべてのインターフェース:
AwareBeanFactoryAwareBeanNameAwareDisposableBeanInitializingBeanSmartInitializingSingletonApplicationContextAwareLifecyclePhasedSmartLifecycleExpressionCapableOrderlyShutdownCapableMessageProducerIntegrationPatternNamedComponentIntegrationInboundManagementIntegrationManagementManageableLifecycleManageableSmartLifecycleTrackableComponent

public class AmqpInboundChannelAdapter extends MessageProducerSupport implements OrderlyShutdownCapable
AMQP キューからメッセージを受信し、Spring Integration メッセージに変換し、結果をメッセージチャネルに送信するアダプター。
導入:
2.1
作成者:
Mark Fisher, Gary Russell, Artem Bilan
  • フィールドの詳細

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

    • AmqpInboundChannelAdapter

      public AmqpInboundChannelAdapter(MessageListenerContainer listenerContainer)
      提供されたコンテナーを使用してインスタンスを構築します。
      パラメーター:
      listenerContainer - コンテナー。
  • メソッドの詳細

    • setMessageConverter

      public void setMessageConverter(MessageConverter messageConverter)
    • setHeaderMapper

      public void setHeaderMapper(AmqpHeaderMapper headerMapper)
    • setRetryTemplate

      public void setRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)
      アダプター内でメッセージ配信を再試行するために使用する RetryTemplate を設定します。コンテナーレベルでの再試行の追加とは異なり、これを ErrorMessageSendingRecovererRecoveryCallback とともに使用して、再試行が終了した後にエラーチャネルに公開できます。通常、ここで再試行を使用する場合はエラーチャネルを設定しないでください。代わりに、RecoveryCallback を使用してください。
      パラメーター:
      retryTemplate - テンプレート。
      導入:
      4.3.10.
      関連事項:
    • setRecoveryCallback

      public void setRecoveryCallback(org.springframework.retry.RecoveryCallback<?> recoveryCallback)
      アダプター内で再試行を使用する場合は、RecoveryCallback を設定してください。setMessageRecoverer(MessageRecoverer) と相互に排他的です。
      パラメーター:
      recoveryCallback - コールバック。
      導入:
      4.3.10
      関連事項:
    • setMessageRecoverer

      public void setMessageRecoverer(MessageRecoverer messageRecoverer)
      再試行操作用に MessageRecoverer を構成します。setRecoveryCallback(RecoveryCallback) の代わりに AMQP 固有の便利さ。
      パラメーター:
      messageRecoverer - 使用する MessageRecoverer
      導入:
      5.5
    • setBatchingStrategy

      public void setBatchingStrategy(BatchingStrategy batchingStrategy)
      バッチプロデューサー(BatchingRabbitTemplate など)によって作成されたメッセージをバッチ解除するときに使用するバッチ戦略を設定します。デフォルトは SimpleBatchingStrategy です。
      パラメーター:
      batchingStrategy - 戦略。
      導入:
      5.2
    • setBindSourceMessage

      public void setBindSourceMessage(boolean bindSourceMessage)
      IntegrationMessageHeaderAccessor.SOURCE_DATA という名前のヘッダーのソースメッセージをバインドするには、true に設定します。
      パラメーター:
      bindSourceMessage - バインドする場合は true。
      導入:
      5.1.6
    • setBatchMode

      public void setBatchMode(AmqpInboundChannelAdapter.BatchMode batchMode)
      リスナーコンテナーが consumerBatchEnabled で構成されている場合は、バッチに対して生成されるメッセージのペイロード型を設定します。デフォルトは AmqpInboundChannelAdapter.BatchMode.MESSAGES です。
      パラメーター:
      batchMode - バッチモード。
      導入:
      5.3
    • getComponentType

      public StringSE getComponentType()
      クラスからコピーされた説明: IntegrationObjectSupport
      サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。
      次で指定:
      インターフェース NamedComponentgetComponentType 
      オーバーライド:
      クラス IntegrationObjectSupportgetComponentType 
    • onInit

      protected void onInit()
      クラスからコピーされた説明: IntegrationObjectSupport
      サブクラスは、初期化ロジック用にこれを実装できます。
      オーバーライド:
      クラス MessageProducerSupportonInit 
    • doStart

      protected void doStart()
      クラスからコピーされた説明: MessageProducerSupport
      デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。"lifecycleLock" によって保護されています。
      オーバーライド:
      クラス MessageProducerSupportdoStart 
    • doStop

      protected void doStop()
      クラスからコピーされた説明: MessageProducerSupport
      デフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。
      オーバーライド:
      クラス MessageProducerSupportdoStop 
    • beforeShutdown

      public int beforeShutdown()
      インターフェースからコピーされた説明: OrderlyShutdownCapable
      シャットダウンが始まる前に呼び出されます。実装は、新しいメッセージの受け入れを停止する必要があります。オプションで、処理中のアクティブなメッセージの数を返すことができます。
      次で指定:
      インターフェース OrderlyShutdownCapablebeforeShutdown 
      戻り値:
      使用可能な場合、アクティブなメッセージの数。
    • afterShutdown

      public int afterShutdown()
      インターフェースからコピーされた説明: OrderlyShutdownCapable
      スケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。
      次で指定:
      インターフェース OrderlyShutdownCapableafterShutdown 
      戻り値:
      使用可能な場合、アクティブなメッセージの数。
    • getErrorMessageAttributes

      protected AttributeAccessor getErrorMessageAttributes(Message<?> message)
      クラスからコピーされた説明: MessageProducerSupport
      errorMessageStrategy でエラーメッセージを作成するときに使用する AttributeAccessor を設定します。
      オーバーライド:
      クラス MessageProducerSupportgetErrorMessageAttributes 
      パラメーター:
      message - メッセージ。
      戻り値:
      属性。