Sha256: c371ebb3b9d5afc5c1c125878fbc50e2d5b0520d13e8d41af4f083e078a9fc10
Contents?: true
Size: 655 Bytes
Versions: 5
Compression:
Stored size: 655 Bytes
Contents
# frozen_string_literal: true module SalesforceStreamer class MessageReceiver class << self # @param topic [String] The unique Salesforce Topic name # @param handler [Object] An object that responds to .call(message) # @param message [Hash] The event payload def call(topic, handler, message) if handler.respond_to? :perform_async handler.perform_async message else handler.call message end ReplayPersistence.record topic, message.dig('event', 'replayId') rescue StandardError => e Configuration.instance.exception_adapter.call e end end end end
Version data entries
5 entries across 5 versions & 1 rubygems