lib/message.js
function Message(message, headers, deliveryInfo, obj) {
  // Crane uses slash ('/') separators rather than period ('.')
  this.topic = deliveryInfo.routingKey.replace(/\./g, '/');
  this.headers = headers;
  if (deliveryInfo.contentType) { this.headers['content-type'] = deliveryInfo.contentType; }
  
  if (Buffer.isBuffer(message.data)) {
    this.data = message.data;
  } else {
    this.body = message;
  }
  
  this.__msg = obj;
}
function Message(message, headers, deliveryInfo, obj) {
  // Crane uses slash ('/') separators rather than period ('.')
  this.topic = deliveryInfo.routingKey.replace(/\./g, '/');
  this.headers = headers;
  if (deliveryInfo.contentType) { this.headers['content-type'] = deliveryInfo.contentType; }
  
  if (Buffer.isBuffer(message.data)) {
    this.data = message.data;
  } else {
    this.body = message;
  }
  
  this.__msg = obj;
}
function Message ( message , headers , deliveryInfo , obj ) { // Crane uses slash ('/') separators rather than period ('.') this . topic = deliveryInfo . routingKey . replace ( / \. / g , '/' ) ; this . headers = headers ; if ( deliveryInfo . contentType ) { this . headers [ 'content-type' ] = deliveryInfo . contentType ; } if ( Buffer . isBuffer ( message . data ) ) { this . data = message . data ; } else { this . body = message ; } this . __msg = obj ; }
`Message` constructor.

@api protected
Message constructor .