Package com.axelor.workflow.message
Class WorkflowMessageService
java.lang.Object
com.axelor.workflow.message.WorkflowMessageService
Offers sent messages to whatever is waiting for them; the scheduler decides when. A row nobody
takes stays pending and is offered again on the next poll, until it is taken or expires.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintOffer one message to every park correlated to it, counting the attempt either way.pendingIds(int limit) Messages still looking for a subscriber, least-offered first and oldest first among equals, so every pending row gets an offer before any gets a second, and a fresh send is taken on the next poll.voidrecordAttempt(Long messageId) Count an offer whose delivery threw, so the row moves to the back rather than blocking the head of the queue.
-
Constructor Details
-
WorkflowMessageService
public WorkflowMessageService()
-
-
Method Details
-
pendingIds
Messages still looking for a subscriber, least-offered first and oldest first among equals, so every pending row gets an offer before any gets a second, and a fresh send is taken on the next poll. -
recordAttempt
Count an offer whose delivery threw, so the row moves to the back rather than blocking the head of the queue. -
deliver
Offer one message to every park correlated to it, counting the attempt either way. Two nodes may offer the same row: each park is claimed by one winner and the row settles once.- Returns:
- how many parks this offer woke
-