type -> messageType