Practical Microservices:

The deserialize function first appears as a mapper for the result of reading the last message of a stream. On page 75 it is stated that the deserialize function does not work on category stream messages, but that that’s fine because the last message of a category stream will not be needed.

However, deserialize is called for messages read from all streams, whether category streams or not. This is shown on page 76 where the read function is displayed.

It also doesn’t make sense since the stream of last read positions is a category stream where the category is subscriberPosition.

It appears that either the statement about the deserialize function is simply incorrect, or it needs to be made clear what category streams are and how they differ from the entity and command streams.

It’s an ambiguity with “this function.” That is meant to refer to readLastMessage, but its position in the text makes it perfectly reasonable to interpret it to mean deserializeMessage.

You wouldn’t get an error if you called the underlying Message DB function with a category stream, but it most likely wouldn’t find any messages with that exact stream_name either.

Ah, got it. Thanks very much.