Skip to content

Commit

Permalink
update method names
Browse files Browse the repository at this point in the history
  • Loading branch information
raghuramg committed Dec 30, 2024
1 parent 93612a6 commit d24195a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/event_source/protocols/amqp/bunny_queue_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def on_receive_message(

subscriber = subscriber_klass.new
subscriber.channel = @subject.channel
payload = decompress_payload_if_binary(payload)
payload = decode_payload(payload)
subscription_handler =
EventSource::Protocols::Amqp::BunnyConsumerHandler.new(
subscriber,
Expand All @@ -151,7 +151,7 @@ def on_receive_message(
subscriber = nil
end

def decompress_payload_if_binary(payload)
def decode_payload(payload)
async_api_subscribe_operation = @async_api_channel_item.subscribe
return payload unless async_api_subscribe_operation.message

Expand Down
4 changes: 2 additions & 2 deletions lib/event_source/publish_operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def initialize(channel, publish_proxy, async_api_publish_operation)
# @example
# #publish("Message", :headers => { })
def call(payload, options = {})
payload = compress_payload_if_required(payload)
payload = encode_payload(payload)
@subject.publish(
payload: payload,
publish_bindings: @async_api_publish_operation[:bindings],
headers: options[:headers] || {}
)
end

def compress_payload_if_required(payload)
def encode_payload(payload)
return payload unless @async_api_publish_operation.message

message_bindings = @async_api_publish_operation.message['bindings']
Expand Down

0 comments on commit d24195a

Please sign in to comment.