Akka Cassandra Persistence: multiple manifests?

34 views
Skip to first unread message

Alan Burlison

unread,
Jan 18, 2017, 1:52:22 PM1/18/17
to akka...@googlegroups.com
I've been looking at the implementation of Cassandra persistence,
there appears to be two manifests that get persisted to Cassandra, one
related to the PersistentRepr and one related to the serializer that's
being used.

https://github.com/akka/akka-persistence-cassandra/blob/master/src/main/scala/akka/persistence/cassandra/journal/CassandraJournal.scala#L392

Why is is the PersistentRepr one saved? I don't seem to be able to
find it being used anywhere.

Thanks,

--
Alan Burlison
--

Patrik Nordwall

unread,
Jan 18, 2017, 2:33:00 PM1/18/17
to akka...@googlegroups.com
The event's serialization manifest is stored in "ser_manifest" and the PersistentRepr.manifest is stored in "event_manifest".
I can see the confusion :) and I guess the naming went bad in one of many refactorings. Can't change column names now.

The two manifests have different purposes.
"ser_manifest" together with "ser_id" is used for the serialization of the event (payload).


PersistentRepr.manifest is used by the event adapters (in akka-persistence).

/Patrik





--
Alan Burlison
--

--
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Alan Burlison

unread,
Jan 18, 2017, 5:26:56 PM1/18/17
to akka...@googlegroups.com
On 18/01/2017 19:32, Patrik Nordwall wrote:

> The event's serialization manifest is stored in "ser_manifest" and the
> PersistentRepr.manifest is stored in "event_manifest".
> I can see the confusion :) and I guess the naming went bad in one of many
> refactorings. Can't change column names now.

It's no big deal ;-)

> The two manifests have different purposes.
> "ser_manifest" together with "ser_id" is used for the serialization of the
> event (payload).

Yep, that's what I'd figured out.

> PersistentRepr.manifest is used by the event adapters (in akka-persistence).

Ahah, that's the bit I was missing - where they were used. Thanks :-)

https://github.com/akka/akka/blob/v2.4.16/akka-persistence/src/main/scala/akka/persistence/journal/EventAdapter.scala#L39

--
Alan Burlison
--
Reply all
Reply to author
Forward
0 new messages