# File lib/stomp/connection.rb, line 350 def publish(destination, message, headers = {}) raise Stomp::Error::NoCurrentConnection if @closed_check && closed? raise Stomp::Error::ProtocolErrorEmptyHeaderKey if headers.has_key?("") raise Stomp::Error::ProtocolErrorEmptyHeaderValue if @protocol == Stomp::SPL_10 && headers.has_value?("") headers = headers.symbolize_keys headers[:destination] = destination _headerCheck(headers) slog(:on_publish, log_params, message, headers) transmit(Stomp::CMD_SEND, headers, message) end