Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
Eventstore sort by partical stream

Im currently unable to create a new stream with a prefix, based on the other one.

one example stream can be:

person.admin

it seems like according to docs, https://developers.eventstore.com/server/v5/projections.html#user-defined-projections-api

fromStreamsMatching cant be done on a projections that "one-time".

I could not find any documentation with working code (TS/JS), that would allow me to use this projection to go from person.admin to user.admin

What do I need to do to allow my Continuous projection to work?

current behaviour:

0@$projections-user-result

want:

0@user-{USERNAME OR ID}-result

Projections:

options({
    resultStreamName: "user-",
    $includeLinks: true,
    reorderEvents: false,
    processingLag: 500
})

fromStreamsMatching('person.')
    .when({
        $init: function() {
            return {
                logins: 0,
            }
        },
        login: function(state, event) {
            state.logins += 1;
        },

    })
    .outputState()
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

When I read the docs following the link in your question, I see this:

enter image description here

It says that the argument for the forStreamMatching function is a function that should return true of false given the stream name, like stream => stream.startsWith("person."). I am not sure where the docs say that it would work with a string prefix.

A warning: the ES6 syntax is only supported in ESDB >= 21.10

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!