Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
#115 - disable publishing for OutboxEventService actions
Browse files Browse the repository at this point in the history
Otherwise an infinite loop arises
  • Loading branch information
danhaywood committed Oct 14, 2019
1 parent 9214de0 commit 3407d35
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.DomainService;
import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.Publishing;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.registry.ServiceRegistry;
import org.isisaddons.module.publishmq.dom.outbox.events.OutboxEvent;
Expand All @@ -29,15 +30,15 @@ public class OutboxEventService {
*
* @return
*/
@Action(semantics = SemanticsOf.SAFE)
@Action(semantics = SemanticsOf.SAFE, publishing = Publishing.DISABLED)
public OutboxEvents pending() {
final OutboxEvents outboxEvents = serviceRegistry.injectServicesInto(new OutboxEvents());
final List<OutboxEvent> oldest = outboxEventRepository.findOldest();
outboxEvents.getEvents().addAll(oldest);
return outboxEvents;
}

@Action(semantics = SemanticsOf.IDEMPOTENT)
@Action(semantics = SemanticsOf.IDEMPOTENT, publishing = Publishing.DISABLED)
public void delete(final String transactionId, final int sequence) {
outboxEventRepository.deleteByTransactionIdAndSequence(UUID.fromString(transactionId), sequence);
}
Expand Down

0 comments on commit 3407d35

Please sign in to comment.