azure webjobssdk - Get BrokeredMessage from within custom IJobActivator -


is possible @ underlying brokeredmessage in web job service bus trigger within ijobactivator? useful in multi-tenant scenario.

i'm using custom ijobactivator unity instantiate jobs. within unityjobactivator class, i'd able @ underlying brokeredmessage , pull custom properties off of it, such "tenant", of messages have. allow me inject appropriate database connection, or configuration objects job class before executed.

below example want inject itenantconfiguration job, have based on brokeredmessage custom property. if access brokeredmessage within unityjobactivator.

public class customjob {     private const string subscription = "subscription";     private const string topic = "topic";      private itenantconfiguration config;      public customjob(itenantconfiguration config)     {         // configuration depends on tenant property of brokeredmessage         this.config = config;     }      public void handle([servicebustrigger(topic, subscription)] mymessage mymessage)     {         // mymessage , appropriate configuration     }  } 

yes, bind brokeredmessage instead of mymessage:

public void handle([servicebustrigger(topic, subscription)] brokeredmessage mymessage) { ... } 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -