Resolving links for projections not working?

49 views
Skip to first unread message

Sebastian Wilgosz

unread,
Mar 13, 2020, 11:35:01 AM3/13/20
to Event Store
Hello, 

I have troubles with resolving links for projections. It seems that ES-ResolveLinkTos header does not work.


Here is the case I have: 

We have projections for every EventType we publish.

Then there is an event handler that subscribes to Different event types. We got an issue of receiving events in the wrong order when we'd subscribed just to several streams, so instead, we went with a different solution.

Now we create a Projection via the API that merges all necessary events into one stream while keeping the correct order, and then the event handler subscribes to its own stream.

The generated projection looks like this: 


fromStreams
(["$et-Events::JobAdTrashed", "$et-Events::JobAdLocaleChanged"])


But when we create a subscription to this stream, we don't see links resolved even though we pass the `ES-ResolveLinkTos` header. 

I still get events that have `EventType: $>`



Can anyone help me how to resolve it properly when using `consume_feed` during the continuous subscription?

Thanks in advance

Sebastian Wilgosz

unread,
Mar 13, 2020, 11:45:58 AM3/13/20
to Event Store
Here Is the screen of the stream events I got.

My service name: default
Handler name: DummyHandler5
The stream name created by projection: $projections-default-DummyHandler5-order

I attach two screenshots of the streams and subscription details
projection-stream.png
subscription-edit.png

Yorick Laupa

unread,
Mar 13, 2020, 3:44:46 PM3/13/20
to Event Store
Hi Sebastian,

I got several leads here but just in case, would you care to share the code of your projection and also configuration details?

Sebastian Wilgosz

unread,
Mar 16, 2020, 6:14:50 AM3/16/20
to Event Store
I wrote a client in to generate requests like this one: 

curl -i --data 'fromStreams(["$et-SomethingHappened", "$et-SomethingElseHappened"])' \
 
-u admin:changeit \
  http
://localhost:2113/projections/continuous?name=default-DummyHandler&type=js&enabled=true&emit=true&trackemittedstreams=true

When I pass a list of streams to merge dynamically:

My projection code in the event store panel looks like this: 

fromStreams(["$et-Events::JobAdTrashed", "$et-Events::JobAdLocaleChanged"])


Then the subscription I created for this:

Groupdefault-DummyHandler
Stream$projections-default-DummyHandler-order
Configuration
Resolve Link Tos
Start From0
Message Timeout (ms)10000
Extra Statistics
Max Retry Count5
Live Buffer Size500
Buffer Size500
Read Batch Size20
CheckPoint After (ms)1000
Min CheckPoint Count10
Max CheckPoint Count500
Max Subscriber Count10


Then the stream generated by this projection: $projections-default-DummyHandler

4321@$et-SomethingHappened$>2020-03-13 16:37:02JSON
4221@$et-SomethingElseHappened$>2020-03-13 16:37:02JSON
4120@$et-SomethingHappened$>2020-03-13 16:37:02JSON


And when I'm trying to read it, the links are not resolved....

Sebastian Wilgosz

unread,
Mar 17, 2020, 4:58:56 AM3/17/20
to Event Store
Just FYI: the checkboxes in the previous post are unchecked ONLY because of the Google Groups formatting issue. They ARE checked in the config.
Reply all
Reply to author
Forward
0 new messages