PersistentSubscriptions against system streams

Hi,

I have one application publishing events to multiple streams like “{aggregateType}-{aggregateId}”. I have another application that is interested in processing only events for two given types MyEvent1 and MyEvent2.

The $by_event_type projection is enabled and running and I see the events on $et-MyEvent1 and $et-MyEvent2 respectively. I’ve created persistent subscriptions against system streams like $et-MyEvent1 and $et-MyEvent2 but I’m not receiving any events back. Also my subscription isn’t being dropped, it just isn’t receiving anything.

Am I doing something wrong?

Thanks for help.

Regards,

Manuel Felicio

How are you creating it/connecting to it? Are you connecting as a user
that has permissions

What is the result of
curl -i http://{eventstore-ip}:{external_http_port}/subscriptions

``

Hi,

Thanks for the replies. It is working now. I am connecting as a user with permissions.

The problem was that in my onEvent handler I had some lookup logic based on the @event.OriginalEvent.EventType (which was working when subscribing from the same stream that I was publishing events before), but after using a projected stream this EventType property contains “$>” instead of the actual event type. Using @event.Event.EventType instead works. It is a bit confusing though…

I also enabled ResolveLinkTos on my persistent subscription. Not sure if that actually caused this behaviour to be different from before.

I also enabled ResolveLinkTos on my persistent subscription. Not sure
if that actually caused this behaviour to be different from before.

Yes ResolveLinkTos changes the behaviour (whether you get a link $> or
resolve the link eg get event)

This is the same behaviour resolveLinkTo has on read
operations/subscription operations/catchup subscription/etc btw

Ok, that makes sense.

Another thing that keeps happening is that although I am now correctly receiving and processing the events on my persistent subscription, sometimes the web UI shows a divergence between the Known / Current events.

I publish a new event, I process it and acknowledge it. Then the Known number increases but the Current remains as is. The server logs seem pretty normal.

in 3.5.0? I believe Pieter updated to UI in 3.5.0 around something like this.

Yes, I am using 3.5.0.