In 2.16, DefaultRuntimeEndpointRegistry (an EventNotifier) is extended to being able to handle ExchangeCreatedEvent s.
In its notify(EventObjet), when processing an ExchangeCreateEvent, a reference to exchange's from endpoint is needed in order to obtain its endpoint uri.
The problem is located in MongoDbEndpoint createMongoDbExchange)()
This Exchange constructor does not take into consideration exchange's from endpoint, consequently causing a NPE when processing its associated ExchangeCreatedEvent.
When constructing an exchange, MongoDbEndpoint should use its parent 's createExchange() which uses the proper Exchange constructors.