InMemoryTopics
Topics in memory, a TopicProducer and a PartitionedSource at once, for tests and samples, as the other in-memory backends: a topic is created, or created with partitions partitions when it is first written or read; a message goes to the partition it names, else to the one its key's hash picks (partitionOf), and every partition keeps what it was sent, from offset 0, up to its last retention messages, until retain drops its oldest messages as a broker's retention would.
failure, when set, makes every send throw it without writing anything, as a broker that does not acknowledge.
As a TopicAdmin, it describes the topics created so far and creates the ones asked for; grow adds partitions to a topic, as an operator does to a Kafka topic.
Public, unlike the other in-memory backends: the test server takes one to share between the nodes it starts (wowServer(topics = …)) and gives each node's (server.bean<InMemoryTopics>()), so a test reads what the sagas sent and the streams published.
Properties
The most messages a partition keeps, at least one (DEFAULT_RETENTION unless set): once a write takes a partition past it, the partition drops its oldest messages, as a broker's size retention drops them, and the topic says so once, the first time. A read from an offset no longer kept starts at the oldest one kept, the offset gap a reader handles as it does on a broker (PartitionedSource.read). So the topics stay bounded however long the node runs: they cannot keep a message until its readers have read it, since a source knows no reader's position, which each keeps in its own checkpoint.
Functions
The partition of key in topic: its String.hashCode, not the log's hash (me.ahoo.wow.spi.log.Partitioner). For an aggregate's key in ASCII, as the ids of the test fixtures are (the text the log hashes when its names need no escape), the two hashes' low bits always differ: String.hashCode's is the parity of the characters' low bits, FNV-1a's, over the same bytes, that parity flipped by its odd offset basis. Beyond ASCII they need not (String.hashCode reads UTF-16 units, FNV-1a UTF-8 bytes). So with an even number of partitions here, the log's being a power of two, no such aggregate is in the same partition of a topic and of the log: a test that needs one in both gives the topic an odd number of partitions (3, say) and picks an aggregate the two agree on.