expose tick callback and OnMessage