exporting events

19 views
Skip to first unread message

Andrea Salvadore

unread,
Apr 16, 2014, 3:35:04 PM4/16/14
to events...@googlegroups.com
What would be the best way to export the events? I would like to have an actor that given a message would get the last N events, deserialize them and send return them as json.
This should be independent from the current state of the application. 

Thanks for your help! 

Duncan DeVore

unread,
Apr 18, 2014, 4:23:48 PM4/18/14
to events...@googlegroups.com
Hi Andrea,

There's no automatic way to do this. Your best bet would be to look at the replay code of whatever journal you are using. This will show you how to pull the events out in the appropriate order and then deserialize them using whatever serializer the journal uses.

Cheers,

The preceding email message may contain confidential information of Viridity Energy, Inc. It is not intended for transmission to, or receipt by, any unauthorized persons. If you have received this message in error, please (i) do not read it, (ii) reply to the sender that you received the message in error, and (iii) erase or destroy the message.

Andrea Salvadore

unread,
Apr 27, 2014, 12:14:23 PM4/27/14
to events...@googlegroups.com
Thanks Ducan, I am using the ReactiveMongo journal.
I had a quick look at it and it seems easy enough. The only thing I didn't quite get is the msgs /acks logic there.
Are acks stored as well as messages (with confirmingChannelId > 0) ?

Also what are the acks set to in the message itself? Is it simply making sure that the replay message will contain only one ack?

msgFromBytes(rm.msgAsBytes).copy(acks = acks.filter(ack => ack.key.sequenceNr == rm.key.sequenceNr).map(_.key.confirmingChannelId))

Thanks for your help!
Reply all
Reply to author
Forward
0 new messages