Skip to content

1.5.3

Compare
Choose a tag to compare
@rodrigogdea rodrigogdea released this 02 Sep 20:05
· 9 commits to master since this release

Filter Events by some Event's Attribute

From regular stream

val readJournal = ReactiveMongoJournalProvider(system).readJournalFor(Seq("Orders"))
readJournal
  .currentEventsByTags(Seq("TAG"), NoOffset, BSONDocument("events.p.customerId" -> customerId), None)
  .mapAsyc(envelope => someEventualWork(envelope))
  .run()

From non-termination stream

val readJournal = ReactiveMongoJournalProvider(system).readJournalFor(Seq("Orders"))
readJournal
  .eventsByTags(Seq("TAG"), NoOffset, BSONDocument("events.p.customerId" -> customerId), None, 5.seconds)
  .mapAsyc(envelope => someEventualWork(envelope) )
  .run()