Upcoming Message DB Release: Retrieve Last Message by Type

The Eventide Project community announces the 1.3.0 release of Message DB. The new release will be made available on Wednesday, October 12th, 2022.

The release brings a small update to Message DB’s last message retrieval function, adding the ability to filter based on message type.

The release is backward-compatible with existing client implementations, so client developers don’t have to rush to update their implementations.

The feature itself is also quite special-purpose, and will mostly likely be used for utility and mechanical code in frameworks and toolkits. Which means that there’s a good chance that people building applications on Message DB will not have a specific use case that is addressed by the upcoming update.

What’s New

Message DB’s get_last_stream_message Postgres server function will support an optional parameter named type. This is in addition to the stream_name parameter that has always been part of the get_last_stream_message function’s signature.

The new signature for v1.3.0 is:

get_last_stream_message(stream_name varchar, type varchar DEFAULT NULL)

Example usage:

SELECT * FROM get_last_stream_message("someStreamName", "SomeType");

The previous signature (v1.2.6, and prior) is:

get_last_stream_message(stream_name varchar)

The new implementation will get the last message in a stream specified by the stream_name argument for a given message type if the type argument is specified. If the type argument isn’t specified, then the last message in the stream will be retrieved (which is the current behavior prior to v1.3.0).

For more information about the get_last_stream_message function, see the documentation for the function at:

Updating to v1.3.0

This version requires the use of an update script for existing installations of Message DB. For instructions, see:


The update script will make the following changes to the message_store database:

The following changes are made by the v1.3.0 update script:

  • The get_last_stream_message function is replaced with an implementation that receives the additional type argument that constrains the result to the last message of a stream of a specified message type
  • Grants the execution privilege for the new get_last_stream_message function implementation to the message_store role

This update makes no structural changes to the messages table or its indexes, or adds any new indexes.

Answers to Your Questions

If you’d like to dig into more details about this release, join the Eventide Slack org and get your questions answered: