Interface PersistenceProducer


  • public interface PersistenceProducer
    Spring cloud data channel description for messaging output. This channel is primarily responsible for async IO related to notifying services about persistence state change for entities.

    When sending messages over this channel consider using PersistenceMessage as all consumers will generally expect messages in that format. Instead of doing this:

     producer.persistenceOutput()
             .send(MessageBuilder.withPayload(persisted).build());
     
    Wrap it in a PersistenceMessage like this:
     producer.persistenceOutput()
             .send(MessageBuilder.withPayload(new PersistenceMessage(objToSend)).build());
     
    Author:
    Samarth Dhruva (samarthd)
    • Method Detail

      • persistenceOutput

        @Output
        org.springframework.messaging.MessageChannel persistenceOutput()