Receiving $metadata events on a stream

It seems we are receiving events of type $metadata interspersed with regular events on our streams.
We are currently filtering them out, but it feels a bit brittle, is this expected behaviour?

Best

Rasmus

We are seeing this as well.
Did you ever get a solution to this?

What is your subscription to?

Hi,

They seem to appear in our Category streams.

if I check the original stream we wrote the events to, there doesn’t appear to be any of these $metadata events.

Here is the data and metadata from one of the events:

Data

{
  "$acl": {}
}

Link metadata

{
  "$v": "3:-1:1:3",
  "$c": 21177612,
  "$p": 21177612,
  "$o": "OrderAggregate-347230824f8b461385bbcabfdf38d9e5",
  "$causedBy": "50086f9c-dd1a-4eab-b4bf-c6044384dccf"
}
OrderAggregate-347230824f8b461385bbcabfdf38d9e5" does not have this event in it.

It's not a major problem, but when we create a persistent subscription to our category, we have to silently handle these $metadata events.

AFAIK you always had to do this. Just ignore any event whose type or streamId starts with ‘$’

https://github.com/thefringeninja/derp.inventory/blob/master/Derp.Inventory.Web/Infrastructure/GetEventStore/GetEventStoreEventDispatcher.cs#L74

João,

Thanks for the reply.

I think we will put a change into our service which delivers the events to filter out events which begin with ‘$’

However, we wont filter out stream names which begin with ‘$’ because most of our Persistent Subscriptions actually originate from the category streams.