com.r3corda.node.services.network / InMemoryMessagingNetwork / InMemoryMessaging / removeMessageHandler

# removeMessageHandler

`fun removeMessageHandler(registration: MessageHandlerRegistration): Unit`
Overrides MessagingService.removeMessageHandler

Removes a handler given the object returned from addMessageHandler. The callback will no longer be invoked once this method has returned, although executions that are currently in flight will not be interrupted.

### Exceptions

`IllegalArgumentException` - if the given registration isnt valid for this messaging service.
`IllegalStateException` - if the given registration was already de-registered.