lib/manageiq/messaging/stomp/queue.rb in manageiq-messaging-0.1.4 vs lib/manageiq/messaging/stomp/queue.rb in manageiq-messaging-0.1.5

- old
+ new

@@ -31,12 +31,18 @@ ack(msg) if auto_ack?(options) sender = msg.headers['sender'] message_type = msg.headers['message_type'] message_body = decode_body(msg.headers, msg.body) + client_headers = msg.headers.except(*internal_header_keys) + logger.info("Message received: queue(#{queue_name}), msg(#{payload_log(message_body)}), headers(#{msg.headers})") - result = yield [ManageIQ::Messaging::ReceivedMessage.new(sender, message_type, message_body, msg, self)] + messages = [ + ManageIQ::Messaging::ReceivedMessage.new(sender, message_type, message_body, client_headers, msg, self) + ] + + result = yield messages logger.info("Message processed") correlation_ref = msg.headers['correlation_id'] if correlation_ref result = result.first if result.kind_of?(Array)