Kombu Custom Serializer..

Here is my rough attempt at getting the header data out of the @consume
using a dependency provider (first time so be gentle):

class JMSHeader(DependencyProvider):

        def __init__(self):
            return

        def worker_setup(self, worker_ctx, result=None, exc_info=None):
            return worker_ctx.context_data

        def worker_result(self, worker_ctx, result=None, exc_info=None):
            return worker_ctx.context_data

class qWorker(object):

       headers = JMSHeaders()
       
       @consume(sendQueue, requeue_on_error=True)
       def getHeaders(self, msg):
              print(self.headers)
               ......

I get None but within the class I can see the headers - just can't return
them out.