Interface PublishAcknowledgmentProvider


public interface PublishAcknowledgmentProvider

Create this as a bean to inject a custom provider that will be used to notify the Connector Framework of when messages have been successfully/unsuccessfully published.

Mainly to be used when working with existing binders.

  • Method Summary

    Modifier and Type
    Method
    Description
    The type of the publishing binder.
    createFuture(org.springframework.messaging.support.MessageHeaderAccessor headerAccessor, Object payload)
    Create a CompletableFuture to indicate when a published message has been successfully/unsuccessfully delivered.
  • Method Details

    • binderType

      String binderType()
      The type of the publishing binder.
      Returns:
      the binder type
    • createFuture

      CompletableFuture<Void> createFuture(org.springframework.messaging.support.MessageHeaderAccessor headerAccessor, Object payload)

      Create a CompletableFuture to indicate when a published message has been successfully/unsuccessfully delivered.

      Note: This method will only be invoked once, before handing the message off to output bindings. So if the binder's publish acknowledgment mechanism still uses the deprecated ListenableFuture, then this can be safely converted here using ListenableFuture.completable().

      Parameters:
      headerAccessor - the header accessor to which publish acknowledgment headers (if any) can be injected
      payload - the message payload
      Returns:
      the publish acknowledgment future