Package dk.cloudcreate.essentials.components.foundation.messaging.eip.store_and_forward


package dk.cloudcreate.essentials.components.foundation.messaging.eip.store_and_forward
  • Class
    Description
    The Inbox supports the transactional Store and Forward pattern from Enterprise Integration Patterns supporting At-Least-Once delivery guarantee.
    The Inbox pattern is used to handle incoming messages from a message infrastructure (such as a Queue, Kafka, EventBus, etc).
     
     
    The Inbox supports the transactional Store and Forward pattern from Enterprise Integration Patterns supporting At-Least-Once delivery guarantee.
    The Inbox pattern is used to handle incoming messages from a message infrastructure (such as a Queue, Kafka, EventBus, etc).
     
    The name of an Inbox
    Defines how messages can be consumed by the provided message consumer
     
    The Outbox supports the transactional Store and Forward pattern from Enterprise Integration Patterns supporting At-Least-Once delivery guarantee.
    The Outbox pattern is used to handle outgoing messages, that are created as a side effect of adding/updating an entity in a database, but where the message infrastructure (such as a Queue, Kafka, EventBus, etc.) that doesn't share the same underlying transactional resource as the database.
    Instead, you need to use an Outbox that can join in the same UnitOfWork/transactional-resource that the database is using.
    The message is added to the Outbox in a transaction/UnitOfWork and afterwards the UnitOfWork is committed.
    If the transaction fails then both the entity and the message will be rolled back when then UnitOfWork rolls back.
    After the UnitOfWork has been committed, the messages will be asynchronously delivered to the message consumer in a new UnitOfWork.
    The Outbox itself supports Message Redelivery in case the Message consumer experiences failures.
    This means that the Message consumer, registered with the Outbox, can and will receive Messages more than once and therefore its message handling has to be idempotent.
     
     
    The Outbox supports the transactional Store and Forward pattern from Enterprise Integration Patterns supporting At-Least-Once delivery guarantee.
    The Outbox pattern is used to handle outgoing messages, that are created as a side effect of adding/updating an entity in a database, but where the message infrastructure (such as a Queue, Kafka, EventBus, etc.) that doesn't share the same underlying transactional resource as the database.
    Instead, you need to use an Outbox that can join in the same UnitOfWork/transactional-resource that the database is using.
    The message is added to the Outbox in a transaction/UnitOfWork and afterwards the UnitOfWork is committed.
    If the transaction fails then both the entity and the message will be rolled back when then UnitOfWork rolls back.
    After the UnitOfWork has been committed, the messages will be asynchronously delivered to the message consumer in a new UnitOfWork.
    The Outbox itself supports Message Redelivery in case the Message consumer experiences failures.
    This means that the Message consumer, registered with the Outbox, can and will receive Messages more than once and therefore its message handling has to be idempotent.
     
    The name of an Outbox
    Pattern matching Consumer<Message> for use with Inboxes/Inbox or Outboxes/Outbox
    The PatternMatchingMessageHandler will automatically call methods annotated with the @MessageHandler annotation and where the 1st argument matches the actual Message payload type (contained in the Message.getPayload() provided to the provided Consumer)