Hi, In the auto-scaler we have implemented chain of responsibility to process incoming messages/events from cloud controller. For instance when a cluster is created,
* cc create a ClusterCreated event object * Convert the object to a json message * Set JMS header property which has the value equals to the class name of the event,ClusterCreated in this case. Then from the receiving end, auto scaler knows the class of the incoming message. Then AS send the message thru processer chain. Then AS can convert it to corresponding object since it knows the class the message is converted from. Above is working fine. However when CEP sends the messages to AS, there is not JMS header since CEP doesn't has the ability to set custom headers to outgoing JMS messages. As a result AS cannot identify the class the message was converted from. As a work around the json message conversion is hard coded with attributes names it should receive (clusterid,value...). This is somewhat OK as long as only one message type is there. When there are multiple message types this becomes harder to maintain. Any better way of handling messages received from CEP? Touched, not typed. Erroneous words are a feature, not a typo.
