Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Publisher stops publishing events #22

Open
maciekciolek opened this issue Jan 19, 2016 · 1 comment
Open

Publisher stops publishing events #22

maciekciolek opened this issue Jan 19, 2016 · 1 comment

Comments

@maciekciolek
Copy link

Hello,
I have encountered some problems with query journal. I added the ability to query events from EventsByType projection:

private def allEventsByType[T](eventType: String, fromNumberExclusive: Option[Long] = None, infinite: Boolean): Source[T, Unit] = {
    val streamId = EventStream.System("et-" + eventType)

    val publisher = connection.streamPublisher(
      streamId,
      fromNumberExclusive = fromNumberExclusive.map(value => EventNumber(value.toInt)),
      infinite = infinite,
      resolveLinkTos = true
    )

    Source.fromPublisher(publisher) map { x => serialization.deserialize[PersistentRepr](x).payload.asInstanceOf[T] }
  }

Everything works great, but sometimes the publisher stops to publish events. It occurs randomly - the stream created on the top of Source is not terminated - it does not receive any events from publisher. Is there any good way to watch the current status of subscription in order to debug it?

@t3hnar
Copy link
Contributor

t3hnar commented Jan 19, 2016

@maciekciolek I think you can start from setting log debug for eventstore package and maybe clone StreamPublisher.scala and add additional debugs there...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants