Errors with notification endpoint for local docker registry

I have successfully deployed a local docker registry and implemented an listener endpoint to receive event notifications following the documentation for registry configuration using the sample insecure configuration file. Pushing, pulling and listing images work well. However, i still receive no event notification. The registry logs are throwing some errors i do not really understand:

time="2018-02-02T23:20:48Z" level=warning msg="httpSink{http://localhost:5050/event} encountered too many errors, backing off" time="2018-02-02T23:20:49Z" level=error msg="retryingsink: error writing events: httpSink{http://localhost:5050/event}: error posting: Post http://localhost:5050/event: dial tcp 127.0.0.1:5050: getsockopt: connection refused, retrying"

The endpoint listener is implemented in java and the registry is on an Ubuntu 14.04 server.

So after several hours of research i.e. inspecting the private registry logs, i realized the media-type of the messages posted by registry listener to notification endpoints is either application/octet stream or application/vnd.docker.distribution.manifest.v2+json. Hence my solution was to permit all media types using the annotation consumes = "*/*" as specified in this Spring documentation.(my endpoint is a java application)