added method to close the stream
added scan method for searching for messages by key
updated the extension
added logging messages
clarifying method declaration
moved scope variable
added method to support searching for messages by key