store history and publish incoming WS messages