First draft implementation of subscribe

- Callback via C function
- Handle Register messages from gateway