Skip to content

Commit f6304bd

Browse files
sjvansdimamost
andauthored
.replicateTravels(...);
Co-authored-by: Dietrich Mostowoj <34100436+dimamost@users.noreply.github.com>
1 parent f51667f commit f6304bd

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

guides/events/event-queues.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ await xflights.schedule('replicate', { entity: 'Airports' }).every('10m')
293293
OutboxService outbox;
294294
295295
@Autowired
296-
RemoteService xflights;
296+
TravelService xflights;
297297
298298
Schedulable.of(xflights, outbox)
299299
.scheduled(Schedule.create().every(Duration.ofMinutes(10)))
300-
.emit("replicate", Map.of("entity", "Airports"));
300+
.replicateTravels(...);
301301
```
302302
:::
303303

java/event-queues.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,11 @@ outbox.submit("replicate", message,
8282
OutboxService outbox;
8383

8484
@Autowired
85-
RemoteService xflights;
85+
TravelService xflights;
8686

87-
Schedulable<RemoteService> scheduled = Schedulable.of(xflights, outboxService)
88-
.scheduled(Schedule.create().every(Duration.ofMinutes(10)));
89-
90-
scheduled.emit("replicate", Map.of("entity", "Airports"));
87+
Schedulable.of(xflights, outbox)
88+
.scheduled(Schedule.create().every(Duration.ofMinutes(10)))
89+
.replicateTravels(...);
9190
```
9291

9392
Every outboxed service is guaranteed to implement `Schedulable<T>` — its single method `scheduled(Schedule)` returns the same service typed to use the given schedule on every subsequent emit.

0 commit comments

Comments
 (0)