These are chat archives for JasperFx/jasper

11th
Jan 2018
Mark Warpool
@CodingGorilla
Jan 11 01:20

in marten's documentation there is this statement under "Document Store"

or opt into Postgresql 9.5's fancy new "upsert" capability.

How does one do that actually, or is that just the default now?
Jeremy D. Miller
@jeremydmiller
Jan 11 01:46
That’s left over from when we still supported 9.4. It’s automatic now.
Mark Warpool
@CodingGorilla
Jan 11 01:46
Ok, that's what I figured, thanks
Tomasz Jaskula
@tjaskula
Jan 11 09:25
Hi guys, I was wondering if there is some support in jasper to pass easily metadata along with messages
Jeremy D. Miller
@jeremydmiller
Jan 11 12:36
You’d be able to pass key/value pairs in the envelope headers. What are you needing to do?
Tomasz Jaskula
@tjaskula
Jan 11 13:13
In fact I was looking for passing causationId, correlationId and messageId from commands to events. Meaning that when I receive a command it would already have an enveloppe (set for example by my middleware), then I'll invoke in my command handler some behavior on my aggregate which will produce events, ideally when publishing events I would like to post it with enveloppe/metadata where the event causationid = command messageId and both would have the same correlationId. My point is that I would like to avoid manually to recopy those from command enveloppe to event enveloppe. I would like to plug me in somewhere in the middle to do it in generic way for all.
Jeremy D. Miller
@jeremydmiller
Jan 11 13:19
Ah, gotcha. In your message handlers, you can take Envelope in as a method argument and have access to all of that information
There’s some logic already that moves the original envelope information to “cascading” envelops
Tomasz Jaskula
@tjaskula
Jan 11 13:21
awesome, so I could for example in the same "http request session" post events to jasper and I would somehow pass the enveloppe from commands to events ? Or this is intended for another usage ?
Jeremy D. Miller
@jeremydmiller
Jan 11 13:58
If Jasper were handling a command message that cascaded event messages, yes. Really meant that for traceability across systems. I think you probably want something a little more focused on business correlation though? We don’t have anything that would move HTTP headers to outdoing messages, but I can easily see the value in that, and it wouldn’t be hard.
Tomasz Jaskula
@tjaskula
Jan 11 14:50
Definietly we would like to correlate every message and events so we need a messaging metadata that would help us implement this causation/correlation pattern more easily then just copying values manually in infrastructure components. If I have events as E and command as C this would give the following scenario:
E1 messageId: 5 correlationId:17 causationId:-(this is the first input to our system so no causationId)
C1 messageId: 6 correlationId:17 causationId:5 (this was caused by event 5)
E1 messageId: 7 correlationId:17 causationId:6 (this was caused by command 6)
Jeremy D. Miller
@jeremydmiller
Jan 11 14:50
Would you mind starting up a new GitHub issue on this?
Tomasz Jaskula
@tjaskula
Jan 11 14:51
Yes of course, I'll do this by the evening (EU time)
Jeremy D. Miller
@jeremydmiller
Jan 11 14:53
No hurry, and thank you.
Tomasz Jaskula
@tjaskula
Jan 11 14:54
If jasper had this, it would be really awesome. I think this pattern is implemented in MassTransit but it has other issue forbidding us from using it. Jasper is first lightweight solution that specs really fit to our needs.
Jeremy D. Miller
@jeremydmiller
Jan 11 14:55
Question for farther out, besides messaging, Jasper also has some support for writing HTTP API’s w/ aspnet core as a lightweight alternative to MVC. It’s on the backburner, but what if that could have some automatic integration to the Jasper messaging so that it automatically passes http message identifiers through to any Envelopes that get sent out as part of handling the HTTP request?
Tomasz Jaskula
@tjaskula
Jan 11 14:57
Wow, that would be awesome. We started not so long time ago on CQRS/EventSourcing project with HTTP endpoint and .NET core. So now on integration points (web api controllers) we're doing mapping back and forth between resourcess, results of command handling, business logic invocation etc.
Jeremy D. Miller
@jeremydmiller
Jan 11 14:58
Gotcha. Just out of curiosity, what are you using for event sourcing?
Tomasz Jaskula
@tjaskula
Jan 11 14:58
For now we're using Greg's event store
Jeremy D. Miller
@jeremydmiller
Jan 11 14:58
Gotcha
Tomasz Jaskula
@tjaskula
Jan 11 14:59
The choice was made by one of devs before I join the team, but I know you're using Marten
we have some problems with subscriptions crashing etc. I might as well look into other solutions :)
Jeremy D. Miller
@jeremydmiller
Jan 11 15:04
We’ve only got one app that barely uses the event sourcing in Marten so far. I have to rely on other folks for real feedback on that thing. Didn’t know how GES worked out in production
Piotr Błachut
@pblachut
Jan 11 19:55
We have started using ges about 2 years ago and it works quite well but the begining was difficult especially subscriptions. I would be very happy if marten's es async deamon will have similar subscriptions support :smile:
Mark Warpool
@CodingGorilla
Jan 11 21:31
Question on gin indexes: Is there something special you have to do to use them with a query, or does Marten do it on its own?
Jeremy D. Miller
@jeremydmiller
Jan 11 22:35
That’s all postgres