Package com.avoka.fc.core.outbox
Interface IOutboxProcessor
- All Known Implementing Classes:
MockOutboxProcessor
,OutboxProcessor
public interface IOutboxProcessor
Provide an outbox processor interface.
- Since:
- 22.10.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateProducer
(ServiceConnection serviceConnection) create a producer to produce message with it.void
processOutboxEvent
(Long eventId) Process the event.raiseEvent
(ServiceConnection serviceConnection, String eventTopic, String payload, String eventDetails, String entityType, String entityId, UserAccount user) Create a new EventOutbox entity.void
gets events from storage and send them to process.
-
Method Details
-
createProducer
create a producer to produce message with it.- Parameters:
serviceConnection
- the serviceConnection- Returns:
- an instance of IStreamProducer
-
raiseEvent
EventOutbox raiseEvent(ServiceConnection serviceConnection, String eventTopic, String payload, String eventDetails, String entityType, String entityId, UserAccount user) Create a new EventOutbox entity.- Parameters:
serviceConnection
- the serviceConnection for sending eventeventTopic
- the topic which event should be sent topayload
- the payload which should be senteventDetails
- the event detailsentityType
- the entity type related to this evententityId
- the entity ID related to this eventuser
- the user login name- Returns:
- the created EventOutbox entity
-
sendOutboxEventsToProcess
void sendOutboxEventsToProcess()gets events from storage and send them to process. -
processOutboxEvent
Process the event.- Parameters:
eventId
- and eventId
-